Can anyone suggest a good way of converting a string from UTF-8 to IA5
(ASCII) for the gecos attribute. For example, I have the hypotheical
user �r�� C�rtm�n, with a lot of accented characters in his name
converting his name to ASCII using this code:
my $gecos = encode('ascii', $cn);
Turns it into this ugly mess:
gecos: ?r?? C?rtm?n
Anyone know of any decent perl functions that could turn it into
something more readable, like "Eric Cartman"?
Trying to setup regular expressions would be a nightmare.
--
Prentice
use Search::Tools::Transliterate;
my $ascifier = Search::Tools::Transliterate->new( ebit => 0 );
my $gecos = $ascifier->convert($gecos);
--
Peter Karman . http://peknet.com/ . pe...@peknet.com
Text::Undiacritic was exactly what I needed.
Thanks.
--
Prentice