Setting locale?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Seymour

    Setting locale?

    I have this thing I wrote called "Simple Contact Form." It's just a
    straight-forward contact form. (Rather than repeat myself, check out
    http://jimsun.linxnet.com/SCForm.html if you need to know more.)

    I just received this email:

    In the swedish alphabet we have three characters, å (an a
    with a smal circle over it) ä ( an a with two spots ower it)
    and ö ( an o with two spots over it). When I use the
    emailform those chacters doesn't show as they should. Have
    you any idea of what might be the cause of this?

    Is this a problem with the locale not getting set?

    In Perl, the thing to do is make sure to do a "use locale." But I
    really haven't been able to find anything regarding a "standard
    recommendation" for PHP.

    From what I *have* found, it looks like what I want to do is
    something like:

    In the application's config file:

    // Set this manually if the system default isn't the right thing
    $locale = "";

    In the code:

    @setlocale(LC_A LL, $locale);

    Is this right?

    TIA,
    Jim
    --
    Jim Seymour | PGP Public Key available at:
    | http://www.uk.pgp.net/pgpnet/pks-commands.html
    |
    | http://jimsun.LinxNet.com
Working...