in reply to Re: How to know if a string has UTF-8?
in thread How to know if a string has UTF-8?
I made this based in table at section #Unicode_Encodings in this POD: http://search.cpan.org/author/JHI/perl-5.8.0/pod/perlunicode.podsub _is_unicode { if ($] >= 5.8) { eval(q` if ( $data =~ /[\x{100}-\x{10FFFF}]/s) { return 1 ;}} `); } else { ## No Perl support for UTF-8! ;-/ return undef ; } return undef ; }
Note that when the user isn't in Perl 5.8 I don't want, actually can't, handle the UTF-8, since the implementation was there only to handle UTF-8 as a group of bytes, not as characters. Note that for Perl 5.7 (that isn't stable) I won't hanbdle UTF-8 too.
Now I have a big problem. All the computer that I have here are based on ASCII-extended (ISO-8859-1), and for us is just what we need. But is impossible to tell that you made Unicode support without really test it on UTF-8 platforms (EBCDIC), like a Japanese PC. So, any one have some idea, or a Japanese PC?
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: How to know if a string has UTF-8?
by graff (Chancellor) on May 28, 2003 at 22:10 UTC | |
by gmpassos (Priest) on May 29, 2003 at 05:44 UTC |