COMSCBoy has asked for the wisdom of the Perl Monks concerning the following question:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ASCII to UTF-8
by IlyaM (Parson) on Jul 26, 2002 at 11:08 UTC | |
If you want to convert Latin-1 to UTF-8 it is another question. Take a look on Unicode::String.
-- | [reply] |
|
Re: ASCII (latin1) to UTF-8 (with sub latin1_to_utf8 & utf8_to_latin1)
by gmpassos (Priest) on Jul 26, 2002 at 23:16 UTC | |
Will be better if you use the modules utf8:: or Encode::. But the advantage of this 2 functions is that they works on Perl 5.6 standart, don't need to upgrade it with new modules. If you are using Perl 5.8 use utf8::, take a look in pod, at 'perlunicode' and 'utf8 manpage' (I dont put any link here because this change a lot between the version of Perl, see your release). Don't use this: tr///UC; This doesn't work anymore! * I made the changes like IlyaM says! "The creativity is the expression of the liberty". | [reply] [d/l] |
by IlyaM (Parson) on Jul 26, 2002 at 23:27 UTC | |
-- | [reply] [d/l] |
by shenme (Priest) on Jul 24, 2003 at 23:41 UTC | |
just like the original poster. But that didn't work alike on both Perl versions. Played around some more and hit upon the other variant above. This now works in both test and 'real' programs on both Perl versions. (sigh) -- | [reply] [d/l] [select] |
|
Re: ASCII to UTF-8
by COMSCBoy (Initiate) on Jul 26, 2002 at 12:18 UTC | |
| [reply] |
by IlyaM (Parson) on Jul 26, 2002 at 12:37 UTC | |
-- | [reply] [d/l] |
|
Re: ASCII to UTF-8 or Spectrum to Blue.
by frankus (Priest) on Jul 26, 2002 at 14:45 UTC | |
Not sure why the problem is occuring but... I'm rewriting the code to be a bit more concise, then I might be able to:
This should do the same things, with a bit more clarity However I can't see anything here that refers to Latin or UTF-8.. where is that glitch occuring? -- ¤ | [reply] [d/l] |
|
Re: ASCII to UTF-8
by COMSCBoy (Initiate) on Jul 26, 2002 at 13:09 UTC | |
----------------------- | [reply] [d/l] |
by rattusillegitimus (Friar) on Jul 27, 2002 at 05:02 UTC | |
If I'm correct in guessing that you're asking where to put the header information to set the character set, change your line:
to the following (untested):
-rattus __________ | [reply] [d/l] [select] |