From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Igniris Valdivia Baez <igniris(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: how can I fix my accent issues? |
Date: | 2023-12-12 09:50:21 |
Message-ID: | c1b521c85ca63cc112cd3f2d149e2d810ec2473e.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 2023-12-11 at 13:54 -0500, Igniris Valdivia Baez wrote:
> El sáb, 9 dic 2023 a las 1:01, Laurenz Albe (<laurenz(dot)albe(at)cybertec(dot)at>) escribió:
> >
> > On Fri, 2023-12-08 at 23:58 -0500, Igniris Valdivia Baez wrote:
> > > hello, I have an ETL process collecting data from a postgresql
> > > database and xls files and inserting in a postgresql database that
> > > process occurs great in a local DB in postgres 14 with UTF8
> > > codification and Spanish_Cuba.1952 collation but when I execute that
> > > process in dev which is in postgres 15 and UTF8 with collation
> > > en_US.utf8 the words with accents and ñ looks like an interrogation
> > > symbol, what can I do to fix this?
> >
> > If the data you are sending are encoded in WINDOWS-1252 (I assume that
> > "1952" is just a typo), you should set the client encoding to WIN1252,
> > so that PostgreSQL knows how to convert the data correctly.
> >
> > You can do that in several ways; the simplest might be to set the
> > environment variable PGCLIENTENCODING to WIN1252.
>
> hello to all, thanks for your answers i've changed the encoding using this:
> ALTER DATABASE testdb
> SET client_encoding = WIN1252;
>
> now when we try to select data from a table we get this error:
>
> ERROR: character with byte sequence 0xe2 0x80 0x8b in encoding "UTF8"
> has no equivalent in encoding "WIN1252" SQL state: 22P05ERROR:
> character with byte sequence 0xe2 0x80 0x8b in encoding "UTF8" has no
> equivalent in encoding "WIN1252" SQL state: 22P05
So that was not the correct encoding.
Unfortunately your problem description lacks the precision required
to give a certain answer. You'll have to figure out what encoding the
application data have and how the client encoding is set in the case
where the non-ASCII characters look right and when the don't.
You should also investigate what bytes are actually stored in the database
in both cases.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2023-12-12 16:38:28 | Re: Assistance Needed: Error during PostgreSQL Configuration |
Previous Message | Ron Johnson | 2023-12-12 04:53:34 | Re: Question on overall design |