Setting locale?

This is a discussion on Setting locale? within the PHP Language forums, part of the PHP Programming Forums category; I have this thing I wrote called "Simple Contact Form." It's just a straight-forward contact form. (...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-18-2003
Jim Seymour
 
Posts: n/a
Default 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_ALL, $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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0