Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63631

Re: unicode troubles and postgres [SOLVED]

Date 2014-01-09 11:51 -0800
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: unicode troubles and postgres [SOLVED]
References <52CEEF37.50504@stoneleaf.us>
Newsgroups comp.lang.python
Message-ID <mailman.5283.1389299844.18130.python-list@python.org> (permalink)

Show all headers | View raw


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~

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: unicode troubles and postgres  [SOLVED] Ethan Furman <ethan@stoneleaf.us> - 2014-01-09 11:51 -0800

csiph-web