From: Chris R. <chr...@me...> - 2002-02-26 13:22:31
|
Mar...@ml... wrote: > Hi everybody, >=20 > how can i convert an iso8859-x string that is read out of a file into an > utf8 string that is written to a ldap server. i have already used the > perlmodule convert::recode > but it doesn't works... also the command 'recode xxx..xxx file.xy' is no > solution becaus it converts the whole file and not only the needed > string... >=20 > any help would be welcome > have a nice day > martin >=20 >=20 >=20 Perl 5.6 comes with built-in utf8 support, so you might want to use that. There is also the Unicode-String module from CPAN: <http://search.cpan.org/search?dist=3DUnicode-String> The README for Unicode-String includes this example: print latin1("na=EFve\n")->utf8; which looks pretty much what you want. Cheers, Chris |