| From: | "lms" <piechcio(at)inetcafe(dot)eu(dot)org> | 
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org | 
| Subject: | How to check coding | 
| Date: | 2006-11-22 20:54:11 | 
| Message-ID: | 20061122205411.M72298@inetcafe.eu.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
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
фывапсчямзе
ку
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mulham freshcode | 2006-11-23 17:19:09 | Re: select into | 
| Previous Message | Richard Huxton | 2006-11-22 19:20:52 | Re: Regular Expressions, LIKE, and indexes |