homepage Welcome to WebmasterWorld Guest from 54.211.219.20
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Regexp Question/ advice needed
Regexp
Perllover

5+ Year Member



 
Msg#: 4100327 posted 1:37 pm on Mar 18, 2010 (gmt 0)

I made a regexp rule because Catalyst has some difficulties with uft8 and ISO etc.

It converts to: Ä ä Ö ö Ü ü ß on sending a form.

There is no way of decode so I wrote this rule:

 
$string =~ tr/[Ä,ä,Ö,ö,Ü,ü,ß]/[,,,,,,]/;
$string =~ s///g


But can anyone tell me is there is a simpler regexp?

Greetings from the Duch mountains,

Marco-Paul Breijer

 

janharders

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4100327 posted 3:15 pm on Mar 18, 2010 (gmt 0)

you could use something like

%replacethis = ('"' => '''' => ''); # ...
$string =~ s/(.)/$replacethis$1 }/egis;


to make it easier to maintain and read, but I doubt that it'll be quicker.
On the other hand, have you checked that it's really a bug?
I hate charsets because I often end up going the trial and error-route to make browser, script and database work side by side, but it'd be a surprise if Catalyst couldn't handle that. Does it set accept-charset on the form in question?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved