Hello all,

I am using a module which parses a text file with german umlaut characters (äöü etc.). In this module the 'use locale'-pragma is used and everything works fine executing my script inside an xterm. Problems arise when I want to do the same thing in a CGI-Script (apache-1.3-server).

The script fails because the geman umlaut-characters (äöü etc.) are not part of \w in the CGI-environment, causing some regexes to fail, although I set

$ENV{LANG}='de_DE@euro'
$ENV{LC_CTYPE}='de_DE@euro'
$ENV{LC_COLLATE}='POSIX'

just like it is set in bash-environment. According to documentation of 'use locale' in the camel-book it uses the values in LC_CTYPE for regex-comparisons and in LC_COLLATE for string comparisons.

What can I do to tell apache respective CGI that I am in a german environment and want special german characters to be interpreted as alphanumeric characters?

Thanks,
Daniel.

P.S.: using perl 5.8.0 on a Linux box (SuSe 8.2, kernel 2.4.20)

In reply to locale problems with cgi and apache by orrence

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.