RE: inserts bypass encoding conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  In this case, the real value stored in database is UTF8 byte sequence instead of LATIN1 encoding text, right?   When I run "select * from table" with client_encoding=LATIN1, automatically encoding conversion from UTF8 byte sequence to text ?

Thanks,

James

-----Original Message-----
From: Tom Lane <tgl@xxxxxxxxxxxxx> 
Sent: Wednesday, August 16, 2023 10:03 PM
To: James Pang (chaolpan) <chaolpan@xxxxxxxxx>
Cc: pgsql-admin@xxxxxxxxxxxxxxxxxxxx
Subject: Re: inserts bypass encoding conversion

"James Pang (chaolpan)" <chaolpan@xxxxxxxxx> writes:
>    With client_encoding=UTF8 and server_encoding=LATIN1, looks like 
> insert into value with chr(codepoint) bypass encoding conversion , is 
> it expected ?  test as below ,

The chr() function is a server-side operation that has nothing to do with the client encoding.

			regards, tom lane






[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux