In article <87ljstm4eq....@oxford.xeocode.com>,
Gregory Stark <st...@enterprisedb.com> writes:

> "Bart Degryse" <bart.degr...@indicator.be> writes:
>> Hi,
>> I have a text field with data like this: 'de pati&#235;nt niet'

>> Can anyone help me fix this or point me to a better approach.
>> By the way, changing the way data is put into the field is
>> unfortunately not an option.

> You could use a plperl function to use one of the many html parsing perl
> modules?

Yes, either plperl or some external HTML tool.

>> Basically what I need to do (I think) is
>> - get rid of the &, # and ;
>> - convert the number to hex
>> - make a UTF8 from that (thus: \xEB)
>> - convert that to SQL_ASCII

You know that SQL_ASCII is a misnomer for "no encoding at all, and I
don't care"?  I'd use UTF8 or (if you stay in Western Europe) Latin9.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to