-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -342,9 +342,12 @@ if ($ON_EBCDIC) { | |
|
||
{ | ||
package Encode::utf8; | ||
BEGIN { | ||
$Encode::Encoding{utf8} = bless { Name => 'utf8' } => __PACKAGE__; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dankogai
Author
Owner
|
||
} | ||
use parent 'Encode::Encoding'; | ||
__PACKAGE__->Define('utf8'); | ||
my $strict_obj = bless { Name => "utf-8-strict", strict_utf8 => 1 } => "Encode::utf8"; | ||
my $strict_obj = | ||
bless { Name => 'utf-8-strict', strict_utf8 => 1 } => __PACKAGE__; | ||
Encode::define_encoding($strict_obj, 'utf-8-strict'); | ||
sub cat_decode { | ||
# ($obj, $dst, $src, $pos, $trm, $chk) | ||
|
Do not assign object directly to
$Encode::Encoding{utf8}
. Rather useEncode::define_encoding
as below as that function is doing more (like define alias or set correctly CARP_NOT).