pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Help with High value unicode characters 2+ messages / 2 participants [nested] [flat]
* Help with High value unicode characters @ 2007-08-07 21:09 Chris Hoover <revoohc@gmail.com> 2007-08-08 07:57 ` Re: Help with High value unicode characters Michael Fuhr <mike@fuhr.org> 0 siblings, 1 reply; 2+ messages in thread From: Chris Hoover @ 2007-08-07 21:09 UTC (permalink / raw) To: pgsql-admin We need some help, we have some what we believe are high value unicode characters (Unicode 0x2). How can you search and replace for these? We are storing this data in a text field, and having the data contain this unicode value is violating our xml rules the application uses and causing abends in our application. Obviously our developers will have to fix this in the application, but how do we fix it in our database. We are needed to clean up the existing data so our customers can view the data that has been imported up to this point. Thanks for any advice, Chris ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Help with High value unicode characters 2007-08-07 21:09 Help with High value unicode characters Chris Hoover <revoohc@gmail.com> @ 2007-08-08 07:57 ` Michael Fuhr <mike@fuhr.org> 0 siblings, 0 replies; 2+ messages in thread From: Michael Fuhr @ 2007-08-08 07:57 UTC (permalink / raw) To: Chris Hoover <revoohc@gmail.com>; +Cc: pgsql-admin On Tue, Aug 07, 2007 at 05:09:35PM -0400, Chris Hoover wrote: > We need some help, we have some what we believe are high value unicode > characters (Unicode 0x2). What do you mean by "high value unicode characters (Unicode 0x2)"? Characters with code points in a plane other than Plane 0 (BMP, Basic Multilingual Plane), i.e., with a code point greater than U+FFFF? > How can you search and replace for these? We are storing this data > in a text field, and having the data contain this unicode value is > violating our xml rules the application uses and causing abends in > our application. If I understand what you're asking then you should be able to use regexp_replace (8.1 and later) to fix the data. Example: UPDATE tablename SET columnname = regexp_replace(columnname, E'[\\U00010000-\\U0010FFFF]+', '', 'g') WHERE columnname ~ E'[\\U00010000-\\U0010FFFF]'; If that doesn't help then please clarify the problem. -- Michael Fuhr ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-08-08 07:57 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2007-08-07 21:09 Help with High value unicode characters Chris Hoover <revoohc@gmail.com> 2007-08-08 07:57 ` Michael Fuhr <mike@fuhr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox