in reply to Re: Re: How to know if a string has UTF-8?
in thread How to know if a string has UTF-8?
Note that the "Latin1" characters (x0080-x00ff) are encoded using two bytes in utf8, and are officially "non-ascii". If you want to pass them through (because your current system can handle Latin1), you still need to convert them to iso-8859-1 (i.e. single-byte encoding) in order for your system to display them correctly -- back to the Encode module...if ( $date =~ /[\x{0080}-\x{FFFF}]/ ) {return 1;}
(And I still don't think you need to worry about 32-bit code points -- not for a while.)
As for providing an intelligible view of utf8 data on a single-byte Latin1 system, you could check out Text::Unidecode -- though it might not cover all languages in the manner you would prefer. Another thing to try would be a unicode/utf8-aware browser. There is also a free utility called "yudit" that runs on unix/linux and (I think) ms-windows too -- it's a utf8-aware text editor.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: How to know if a string has UTF-8?
by gmpassos (Priest) on May 29, 2003 at 05:44 UTC |