Warning: cargo-cult programming ahead! This code is from XML::TiePYX, it works except when the strings come from a recent version of XML::Parser.
You can probably try this:
sub utf2latin1 { my $text=shift; $text=~ s{([\xc0-\xc3])(.)}{ my $hi = ord($1); my $lo = ord($2); chr((($hi & 0x03) <<6) | ($lo & 0x3F)) }ge; return $text; }
In reply to Re: Re: unicode file in mysql
by mirod
in thread unicode file in mysql
by coeur2v
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |