From: | douglas morrison <luckycat(at)comcast(dot)net> |
---|---|
To: | "Noah Davis" <noah(at)acadaca(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Bad character data |
Date: | 2004-05-03 20:38:22 |
Message-ID: | D17A83C6-9D41-11D8-83C1-000A95C580C4@comcast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
The lack of responses is prolly because this sort of thing is usually
handled by the client... The client for input should be
stripping/converting to ASCII/unicode whichever chars are unwanted and
notifying the user if anything is removed/unusable. The client for
display should then be able to parse the chars correctly...
You might be able to use your current data if you change your SELECT to
something like:
SELECT to_ascii(columnName, 'LATIN1') AS convertedColumn
FROM tableName;
hth,
doug
On May 3, 2004, at 3:23 PM, Noah Davis wrote:
> I posted this to the pgsql general list, but alas, I did not get any
> responses. Perhaps someone here could be of assistance?
>
> I have a database with some bad characters in it -- some users had
> entered
> MS Word smart quotes, em dashes, foreign characters, and they look like
> gibberish coming out of the database. Most important are the smart
> quotes I
> guess.
>
> What's the best way to replace these characters? I thought I might be
> able
> to run a simple SQL UPDATE command, but some of the gibberish for
> different
> characters looks the same (at least from my client it does), and it
> would
> clobber them all.
>
> I have a feeling there's some sort of ASCII code or unicode solution
> to this
> problem, but I could use am little push in the right direction.
>
> Thanks.
>
> Noah.
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Seymour | 2004-05-03 20:47:26 | Re: installation of postgresql-7.2.3-2PGDG |
Previous Message | scott.marlowe | 2004-05-03 20:20:24 | Re: need libraries to complete PostgreSQLinstall |