[Catalyst] utf8 in mysql
Toby Corkindale
tjc at wintrmute.net
Mon Dec 3 23:24:08 GMT 2007
>> On Sun, 2007-12-02 at 16:41 +0200, Angel Kolev wrote:
>>> Hi again :) I found a solution i think. With Encode::Detect i can do:
>>> use Encode;
>>> require Encode::Detect;
>>> my $utf8 = decode("Detect", $data);
>>
>> Looks like this module uses Mozilla's encoding detector, which does a
>> pretty good job in my experience. If you're trying to guess the
>> encoding of small pieces of text, though, this method probably won't
>> work. The best thing to do is to ask the user what encoding he's using,
>> or mandate UTF-8.
Angel,
Where are you getting the input from?
Is it just form submissions on web pages, or are you accepting file uploads or
emails or I dunno, CDs sent by post, or files-on-flash-sticks or something?
I just ask because there are standard ways to deal with encodings for some of
those methods - for websites it's mostly a solved problem, although there are
always caveats for people using antique browsers.
Toby
More information about the Catalyst
mailing list