Help with ERROR: character 0xc280 of encoding "UTF8" has no equivalent in "WIN1252"

Поиск
Список
Период
Сортировка
От Scot Kreienkamp
Тема Help with ERROR: character 0xc280 of encoding "UTF8" has no equivalent in "WIN1252"
Дата
Msg-id 59E62072D4EFFF4BB912EC607F8FA60B02ECCE50@lzbs6304.na.lzb.hq
обсуждение исходный текст
Список pgsql-general

Hi everyone,

 

I have a database that is UTF8, and a client that is connecting using client encoding WIN1252.  There are a few records in my database that somehow have gotten characters in them that are not viewable.  When viewing the records from the command line using UTF8 client encoding there are strange looking characters, and the records cause an error when viewing under WIN1252 encoding. 

 

I cannot modify the data, so my alternative was this query, which I found an example for on a list that Google was kind enough to translate from French for me:

 

set client_encoding to 'WIN1252' ;

SELECT soldnotesid,soldid,regexp_replace(notes, E'\u008C', ' ', 'g') as notes, privatenote,modified,userloginid,notetype,sourcekey,hidden,notesmodified,notesmodifiedby,created from soldnotes where soldid<'317773002' and soldid>'317771002'

 

However, it still errors out:  psql:sql3:7: ERROR:  character 0xc280 of encoding "UTF8" has no equivalent in "WIN1252"

 

Is there any way to mask these "bad" characters from the field in a query to allow the client to work?  I'll put it in a view once I get it working so the end users can use the view.

 

PG 8.3.7. 

 

Thanks for any help you can provide. 

 

Scot Kreienkamp

 

 

 

 

This message is intended only for the individual or entity to which it is addressed.  It may contain privileged, confidential information which is exempt from disclosure under applicable laws.  If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information.  If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.

В списке pgsql-general по дате отправления:

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Having a equal (=) operator on GIN-indexable columns
Следующее
От: "Day, David"
Дата:
Сообщение: Postgres V9.0.3 and Avahi Zeroconfig