diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-02-24 16:05:55 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-08-29 09:55:55 -0600 |
commit | 61bbb4863a849ae88b9ea67d187db62a76837553 (patch) | |
tree | 6bb29bced2f8b4b0a793ee1b5b91209bafdba44b /t | |
parent | 1248eb9de867fb6d4c046f499398a770f6781c31 (diff) | |
download | perl-61bbb4863a849ae88b9ea67d187db62a76837553.tar.gz |
t/test.pl: Simplify ord to/from native fcns
This commit changes these functions from converting to/from a string to
calling functions which operate on ordinals instead that are in the
utf8:: namespace.
Diffstat (limited to 't')
-rw-r--r-- | t/test.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1728,8 +1728,8 @@ sub ord_latin1_to_native { # equivalent value. Anything above latin1 is itself. my $ord = shift; - return $ord if $ord > 255; - return ord latin1_to_native(chr $ord); + return $ord if ord('^') == 94; # ASCII, Latin1 + return utf8::unicode_to_native($ord); } sub ord_native_to_latin1 { @@ -1737,8 +1737,8 @@ sub ord_native_to_latin1 { # Anything above latin1 is itself. my $ord = shift; - return $ord if $ord > 255; - return ord native_to_latin1(chr $ord); + return $ord if ord('^') == 94; # ASCII, Latin1 + return utf8::native_to_unicode($ord); } 1; |