[postgis-users] Re: [Plr-general] Tutorial on PLR and PostGIS, more on carriage returns

Joe Conway mail at joeconway.com
Thu Jun 21 09:59:48 PDT 2007


Paul Ramsey wrote:
> Danger, will Robinson.  All values are fair game in bytes 2,3,4 of the 
> UTF encodings, so yes, it's possible you'll wreck multi-byte characters 
> by doing a simple replacement on the byte array.  Better to use an 
> encoding-aware string replace function (not knowing C, I don't know what 
> that would be, but there must be some in the PgSQL code base).

I was afraid that would be the case. But yeah, I know there is a 
multibyte-aware replace function in Postgres. A bit more overhead than 
I'd like, but at least after the first execution in a given session the 
compiled bytecode is cached.

Joe



More information about the postgis-users mailing list