Umlauts
Hi,
does anybody here know a good way to handle German Umlauts in Perl, so they can be matched with RegExes?
Later,
Malte
------------------
Malte Ubl - www.Boardzilla.org
Communication: public<->programmers
of the Boardzilla BB
Hi,
does anybody here know a good way to handle German Umlauts in Perl, so they can be matched with RegExes?
Later,
Malte
------------------
Malte Ubl - www.Boardzilla.org
Communication: public<->programmers
of the Boardzilla BB
Malte posted this at 05:51 — 13th January 2000.
They have: 297 posts
Joined: Apr 1999
I'm so sorry Pat...rick.
Seems like UBB is able to handle em.
Malte
------------------
Malte Ubl - www.Boardzilla.org
Communication: public<->programmers
of the Boardzilla BB
Malte posted this at 15:18 — 13th January 2000.
They have: 297 posts
Joined: Apr 1999
Hey Patty,
you should have had this problem before
Later,
Malte
------------------
Malte Ubl - www.Boardzilla.org
Communication: public<->programmers
of the Boardzilla BB
Rob Pengelly posted this at 15:37 — 13th January 2000.
They have: 850 posts
Joined: Jul 1999
Pardon my ignorance, but what are German Umlauts?
------------------
1 in 5,000 north atlantic lobsters are born bright blue.
Malte posted this at 19:59 — 13th January 2000.
They have: 297 posts
Joined: Apr 1999
I love this community
Malte
Malte posted this at 23:17 — 27th January 2000.
They have: 297 posts
Joined: Apr 1999
I got a weired solution to this problem:
$form = form input = "ä"; # data from a web form
$file = file input = "ä"; data read from a file
$file ~= /$form/ # -> false
$form ~= s/ä/§§§/g;
$file ~= s/ä/§§§/g;
$file ~= /$form/ # -> true
This is just example code, so it might have some syntax errors, but thats not the point.
Why does the substitute operator match something which the simple match operator doesnt match???
Malte
[This message has been edited by Malte (edited 27 January 2000).]
Rob Pengelly posted this at 02:22 — 28th January 2000.
They have: 850 posts
Joined: Jul 1999
You could convert the string into it's ascii value.
So
$form = "ä";
$formascii = join('', unpack('c*', $form));
$file = "ä";
$fileascii = join('', unpack('c*', $file));
than do your regexp.
Hope that helps
------------------
Dogs and cats consume over $11 billion worth of pet food a year.
http://www.thehungersite.com - http://www.therainforestsite.com
http://www.ratemymullet.com - Beauty is only mullet deep.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.