Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1142

Posgtesql ODBC incorrectly loaded char(1) despite of setting client encoding to utf-8

$
0
0

I tried to select data with Cyrillic encoding by linux odbc postgresql driver in UTF8.I set client_encoding to UTF8.

The data of column with length > 1 (for example, varchar(10) = 'инсерт' - in Cyrillic) is loaded correctly in UTF-8 encoding.

But the data of column with length = 1 (for example, varchar(1), symbol = 'и' - in Cyrillic ) is loaded incorrectly.

I expected following data with UTF8 encoding with length =2: 0xd0, 0xb8. But I got data with length =1 : 0xd0.

If I performed following sql query:

SELECT convert_to( 'и',  'UTF8')

I got result with length = 2 : 0xd0, 0xb8.

Do you know this case is error on odbc driver? Should I use some parameter for odbc postgresql driver on linux?Thank you.


Viewing all articles
Browse latest Browse all 1142

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>