Re: â in text field

From: John DeSoi <desoi(at)pgedit(dot)com>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: â in text field
Date: 2006-03-15 03:10:27
Message-ID: 0FF4EF1A-4699-4077-8E3E-63EBE92AC4B0@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 13, 2006, at 9:24 PM, CSN wrote:

> I'm updating a field via a web form, and an em-dash is
> getting stored in the database as 'âÂ-', and is
> getting displayed back on the web page as '— '. The
> encoding of the database is SQL_ASCII - should I
> change it? And if so, to what and how?

Yes, you should change it. None of the non-ASCII characters are going
to be properly encoded in the database. What you should change it to
depends the software you are using to process the form. You need to
make sure the client_encoding setting of your connection matches what
you are working with on the form.

Normally you could change the database encoding by dumping and then
reloading the database. But you'll likely have problems because your
SQL_ASCII encoded database has illegal characters that won't be
accepted if you change to something like UTF-8. A utility like iconv
might help with this.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nick Johnson 2006-03-15 03:17:48 Re: Dynamic function execution?
Previous Message John DeSoi 2006-03-15 03:00:18 Re: What's a good default encoding?