Convert text from UTF8 to ASCII
Convert text from UTF8 to ASCII
От:
"Paul Dam" <p.dam@amyyon.nl>
Дата:
Hoi,
I store content of an .txt file in a text column in the database.
server_encoding is UTF8.
If the .txt file is in ASCII this is correctly stored in the database.
If the .txt file is in UTF8 this is NOT correctly stored in the database.
Examples:
In Dutch the term for patient is 'patiënt'.
It is stored as 'patiënt'.
The first line of the .txt file is 'AAAAAAAAAAAA'.
It is stored as 'AAAAAAAAAAAA'.
How can I convert patiënt into patiënt?
Or more precise: How can I convert the text column to the correct format, before insert or when selecting?
Met vriendelijke groet,
Paul Dam
Informatieanalist
Amyyon
Bijsterhuizen 11.58
6546 AS Nijmegen
050 - 311 5686
Re: Convert text from UTF8 to ASCII
От:
Claus Guttesen <kometen@gmail.com>
Дата:
> I store content of an .txt file in a text column in the database. > > server_encoding is UTF8. What does 'psql -l' say? -- regards Claus When lenity and cruelty play for a kingdom, the gentler gamester is the soonest winner. Shakespeare
Re: Convert text from UTF8 to ASCII
От:
"Leif B. Kristensen" <leif@solumslekt.org>
Дата:
On Wednesday 11. March 2009, Paul Dam wrote: >Hoi, > > > >I store content of an .txt file in a text column in the database. > >server_encoding is UTF8. > > > >If the .txt file is in ASCII this is correctly stored in the database. > >If the .txt file is in UTF8 this is NOT correctly stored in the > database. > > > >Examples: > >In Dutch the term for patient is 'patiënt'. > >It is stored as 'patiënt'. That looks a lot like UTF-8 to me. What is your client-encoding? -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/
Re: Convert text from UTF8 to ASCII
От:
"Paul Dam" <p.dam@amyyon.nl>
Дата:
UNICODE. Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl -----Oorspronkelijk bericht----- Van: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] Namens Leif B. Kristensen Verzonden: woensdag 11 maart 2009 16:46 Aan: pgsql-sql@postgresql.org CC: Paul Dam Onderwerp: Re: [SQL] Convert text from UTF8 to ASCII On Wednesday 11. March 2009, Paul Dam wrote: >Hoi, > > > >I store content of an .txt file in a text column in the database. > >server_encoding is UTF8. > > > >If the .txt file is in ASCII this is correctly stored in the database. > >If the .txt file is in UTF8 this is NOT correctly stored in the > database. > > > >Examples: > >In Dutch the term for patient is 'patiënt'. > >It is stored as 'patiënt'. That looks a lot like UTF-8 to me. What is your client-encoding? -- Leif Biberg Kristensen | Registered Linux User #338009 Me And My Database: http://solumslekt.org/blog/ -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
Re: Convert text from UTF8 to ASCII
От:
"Paul Dam" <p.dam@amyyon.nl>
Дата:
UTF8 Met vriendelijke groet, Paul Dam Informatieanalist Amyyon Bijsterhuizen 11.58 6546 AS Nijmegen 050 - 311 5686 www.amyyon.nl -----Oorspronkelijk bericht----- Van: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] Namens Claus Guttesen Verzonden: woensdag 11 maart 2009 16:43 Aan: Paul Dam CC: pgsql-sql@postgresql.org Onderwerp: Re: [SQL] Convert text from UTF8 to ASCII > I store content of an .txt file in a text column in the database. > > server_encoding is UTF8. What does 'psql -l' say? -- regards Claus When lenity and cruelty play for a kingdom, the gentler gamester is the soonest winner. Shakespeare -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql