Search Postgresql Archives

Re: encoding advice requested

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

 



On Sat, Nov 11, 2006 at 02:45:00PM -0500, Rick Schumeyer wrote:
> My database locale is en_US, and by default my databases are UTF8.
> 
> My application code allows the user to paste text into a box and submit 
> it to the database.  Sometimes the pasted text contains non UTF8 
> characters, typically the "fancy" forms of quotes and apostrophes.  The 
> database does not appreciate it when the application attempts to store 
> these characters.

What encoding does your application use? Whatever that is, that's what
you should be using in your SET client_encoding statement. Note you can
set that variable per user also.

> b) I can issue a SET CLIENT_ENCODING TO 'LATIN1'; statement every time I 
> open a connection.  A brief test indicates this will work.

This is the solution, assuming ofcourse your application is in Latin1.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux