I'm having some odd behaviour here with the latest perl 5.8 build trying to deal with 
extended character sets.

I'm pulling some data down from a LDAP Server and the data that comes down is encoded 
in such a fashion that I need to perform the following transformation on the data in 
order to be able to have the accented characters readable under windows.

sub tolatin1 {
        return encode("iso-8859-1", decode("utf8", @_[0]));
}

However, I'm using this routine in a generic fashion and it doesn't want to take a 
regular string containing accented characters properly.

print tolatin1("Bind à réussi");
results in:
Bind ? r?ussi

So basically my question is how do I identify whether the data is already UTF8 encoded 
or not?

Cheers,

Erik

and on a related topic - anyone know what encoding to use to properly display accented 
characters in the cmd window?

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to