Re: how can I fix my accent issues?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Igniris Valdivia Baez <igniris(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: how can I fix my accent issues?
Date: 2023-12-09 16:21:38
Message-ID: 12837021-a7f3-42cc-8718-d21c4acc0ee5@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/9/23 07:54, Igniris Valdivia Baez wrote:
> this is the settings for my local db which I failed to say is also in
> Postgres 14, the dev db is in Postgres 15.4 has UTF an en_US.utf8
> collation, for the ETL process I'm using Pentaho Data Integration
> tool, also known as kettle, thanks in advance

The basic issue is that the receiving database(dev/15.4) assumes it is
receiving UTF8 when in fact it is receiving Spanish_Cuba.1252. The
suggestion from Laurenz Albe was to set PGCLIENTENCODING = WIN1252 to
provide the receiving database the information it needed to make the
proper conversion. This works for
libpq(https://www.postgresql.org/docs/current/libpq-envars.html) based
clients or a client that otherwise 'knows' about PGCLIENTENCODING. I
have no idea whether Pentaho Kettle would make use of PGCLIENTENCODING.
Some searching indicated that you can set character/encoding options in
the Pentaho connection dialog.

>
> El sáb, 9 dic 2023 a las 10:50, Adrian Klaver
> (<adrian(dot)klaver(at)aklaver(dot)com>) escribió:
>>
>> On 12/9/23 07:41, Igniris Valdivia Baez wrote:
>>> hello, thank you for answering, it's not a typo, in the attachments
>>> you can see that this is actually my collation, algo a pic of the
>>> problem for more clarification,
>>> thank you all
>>
>> You picture shows the database collation as Spanish_Cuba.1252 not the
>> Spanish_Cuba.1952 you originally indicated.
>>
>> 1) Which is the above for the production database or the dev one?
>>
>> 2) What are the exact settings for the other database?
>>
>>
>>> best regards
>>>
>>> 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.
>>>>
>>>> Yours,
>>>> Laurenz Albe
>>
>> --
>> Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com
>>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message veem v 2023-12-09 19:13:40 Re: Question on overall design
Previous Message Ron Johnson 2023-12-09 16:10:42 Re: Question on overall design