From: lms <piechcio@inetcafe.eu.org>
To: pgsql-sql@postgresql.org
Subject: How to check coding
Date: Wed, 22 Nov 2006 21:54:11 +0100
Message-ID: <20061122205411.M72298@inetcafe.eu.org> (raw)
Hi
I have a table in SQL_ASCII. Clients with different language versions of
Windows can write data in tha table using different coding systems (polish,
english, cyrillic). Next i would like to convert each line of given column
to UTF8, but each row can use a different coding windows-125*.
Who know how can I check coding in this rows with diffrect coding?
I tried use iconv and sql command convert, but these commands dont returns
any errors and they can convert rows (ex. in windows-1251) from windows-1252
to utf8 whithout any errors, but it is incorrect.
For example (in this row data is in windows-1251):
SELECT CONVERT((select "2" from langset where id_langset=1),'windows-
1250','UTF8')
I got: ĺäńôôô
SELECT CONVERT((select "2" from langset where id_langset=1),'windows-
1251','UTF8')
I got: едсффф
ICONV:
iconv -c -f WINDOWS-1250 -t UTF8 afile
ôűâŕďń÷˙ěçĺęó
iconv -c -f WINDOWS-1251 -t UTF8 a
фывапсчямзе
ку
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: piechcio@inetcafe.eu.org
Subject: Re: How to check coding
In-Reply-To: <20061122205411.M72298@inetcafe.eu.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox