unicode troubles and postgres [SOLVED]
Ethan Furman
ethan at stoneleaf.us
Thu Jan 9 14:51:21 EST 2014
On 01/09/2014 10:49 AM, Ethan Furman wrote:
> So I'm working with postgres, and I get a datadump which I try to restore to my test system, and I get this:
>
> ERROR: value too long for type character varying(4)
> CONTEXT: COPY res_currency, line 32, column symbol: "руб"
>
> "py6" sure looks like it should fit, but it don't. Further investigation revealed that "py6" is made up of the bytes d1
> 80 d1 83 d0 b1.
>
> Any ideas on what that means, exactly?
For the curious, it means CYRILLIC SMALL LETTER ER, CYRILLIC SMALL LETTER U, CYRILLIC CAPITAL LETTER IE WITH GRAVE in
utf-8 format.
The problem was I had created the database from template0 instead of template1, and 0 is SQL-ASCII while 1 is UTF8.
--
~Ethan~
More information about the Python-list
mailing list