What is that character supposed to be?

According to the Wikipedia page on CP1252, 0x81 is an unused character
position. There is a mention that it might map to some ISO-2022 control
code with no unicode equivalent.

I'm not sure where the error message is coming from, though -- if it was in
the python layer, you would see something like:

    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position
0: character maps to <undefined>

Possibly the postgresql interface is trying to convert it to UTF8 for
transfer, and failing, or maybe the psycopg2 layer can't decode it. Is
there any other info you can provide about the error message?

It may end up that you just have to clean the data in the database to be
able to use it.

Ian

On Thu, Oct 4, 2012 at 9:57 AM, Janeskil1525 <janeskil1...@gmail.com> wrote:

> Hi all
>
> I'm new Django user. I have a legacy system based on a Postgres 9.1
> database that is using encoding WIN1252. When i try to retrie data from one
> table I get the following error
>
> >>character 0x81 of encoding "WIN1252" has no equivalent in "UTF8"<< ,
> does that mean i cant use Django together with this database or is there
> some setting i need to change ?
>
> All help appreciated
>
> Thank you in advance!
>
>
> Jan Eskilsson
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/EXpvuuttJ64J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Ian Clelland
<clell...@gmail.com>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to