Re: Multibyte Character References

Michael Wang
Sat, 08 Sep 2007 01:06:18 -0000

Mark Dodwell wrote:
> Hi,
>
> I have a load of records in my database which were imported through
> processing a YAML file. These original YAML files were created from the
> ''to_yaml'' function of an array of Hash objects.
>
> The YAML file contains multibyte character references such as:
>
> ...and between them and today\xE2\x80\x99s College. The scope, r...
>
> When I imported this data into my DB these character references have
> changed but are still there in the DB:
>
> ...and between them and today\342\200\231s College. The scope, r...
>
> So I have two questions:
>
> 1) Are the original characters retreivable from the copy in the DB, or
> has it been mangled?
>
> 2) If the above answer is yes, then how!
>
> Really appreciate any help on this one. Many thanks in advance.
>
> ~ Mark

What''s the encoding in the YAML file (presumably UTF-8), what database
are you using and what encoding is your database/table set to?


--
Michael Wang