doonyakka has asked for the wisdom of the Perl Monks concerning the following question:

Greetings to all Monks worldwide.

Is there any foolproof way to get AS Perl to work with accented characters (and other diacritics)? I've read perllocale and have tried what it suggests, but with no luck. Plus, the examples it gives are non-strict-friendly, at least with my setup.

Surely there must be some easy way to do this...I've been banging my head for some time now :(

Any ideas?

Thanks in advance,
doonyakka

Replies are listed 'Best First'.
Re: Locale and accents
by Jenda (Abbot) on May 20, 2002 at 22:16 UTC

    I guess you'll have to tell us HOW does it fail. What did you try, what did you expect and what did you get. "work with accented characters" is not much of an info.

      Jenda@Krynicky.cz

      Hi Jenda.

      I've been trying to write very simple code to munge wordlists in multiple languages, and I always run up against the problem that accented characters are not recognised. For example, I'm now trying to use Google APIs to query these wordlists using a Perl script. You can see the code at this node. It works fine for [a-z] but [αινσϊρό] etc. return a 500 Internal Server Error.

      Previously, I'd had the same problem using regexes, and you can see the code here.

      Is it really this difficult to get Perl to process other character encoding, or is it just me?

      Thanks for your help :)

      Best,
      doonyakka

      Update: this particular problem solved, with the very kind help of dree. The problem was not with the code, but with Soap::Lite v0.52. dree had Soap::Lite v0.46 and had no problems running the program, and when he upgraded to v0.52 it stopped working (ie., he got the dreaded 500 error). So, I installed 0.46 and hey presto! it's working fine now. Thanks dree!