[OSM-dev] perl and special utf-8 characters

Jochen Topf jochen at remote.org
Fri Mar 11 17:17:26 GMT 2011


Unicode handling in Perl is a bit complex. Read the "perlunicode" manpage
to get some ideas.

Jochen

On Fri, Mar 11, 2011 at 05:56:28PM +0100, Gary68 wrote:
> Date: Fri, 11 Mar 2011 17:56:28 +0100
> From: Gary68 <gary at gary68.de>
> To: mk at koppenhoefer.com
> Cc: dev at openstreetmap.org
> Subject: Re: [OSM-dev] perl and special utf-8 characters
> 
> 
> i wouldn't know how to do it with regexes.
> 
> ok. let's put it this way. i have a POSITIVE list of allowed chars
> (inkl. utf8 2byte ones) and i have a string.
> 
> i want to eliminate all chars in the string that are not in the POSITIVE
> list.
> 
> any idea?
> 
> gerhard
> 
> 
> On Fri, 2011-03-11 at 17:33 +0100, M∡rtin Koppenhoefer wrote:
> > 2011/3/11 Gary68 <gary at gary68.de>:
> > > i want to find out if certain characters (german umlaute) are contained
> > > in a string that i work char by char.
> > 
> > 
> > Hi Gerhard,
> > 
> > I am almost totally ignorant in programming but I guess that if you
> > don't need the parsing character by character for another operation
> > there will already be a general solution for this problem in perl
> > (which might be faster). Recently I did something similar in Postgres
> > and by reading the manual I found a function called "regex replace"
> > (or similar). I suggest you search your docu for this term (or search
> > for "regular expression") and I am 99% sure you will get the answer.
> > 
> > cheers,
> > Martin
> 
> 
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298




More information about the dev mailing list