Dmitry Katsubo wrote on 05/13/2009 07:51 AM:

> I also suffer from a limitation, that "email" attribute may only contain
> ASCII chars. For example, I cannot set:
> 
> mail: Rudolf Bünger <rbuen...@net.com>
> 
> If storing UTF8 in this attribute is not supported, maybe one can give
> an advice, how to convert it to ASCII? I used:
> 
> 'mail' => encode('ascii', $email);
> 
> but it replaces the non-valid chars with "?":
> 

I use Search::Tools::Transliterate for this.

use Search::Tools::Transliterate;
use Search::Tools::UTF8;

my $ascifier = Search::Tools::Transliterate->new( ebit => 0 );
my $ascii    = $ascifier->convert( to_utf8( $my_email ) );

-- 
Peter Karman  .  pe...@peknet.com  .  http://peknet.com/

Reply via email to