Foo Ji-Haw <[EMAIL PROTECTED]> writes:

> I'm trying to 'water down' a utf8-encoded to latin-1. Using
> Encode::encode does the trick, and it replaces character that do not
> fit into latin-1 with a subtitution character (as per the
> documentation)
> 
> Can anyone tell me how I can change this character to something else,
> like a ' '?

In the most recent version of Encode (to appear in perl-5.8.8) you can
provide a code ref returning ' ' s the CHECK argument to encode().

If you can't use that version try this:

   $str = Encode::encode("iso-8859-1", $str);
   $str =~ s/\x{FFFD}/ /g;

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

Reply via email to