Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Server info (DNS and IPs removed):

cat /proc/version && uname -a && java -version

Linux version 2.6.16.33-xenU (*************) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #2 SMP Wed Aug 15 17:27:36 SAST 2007
Linux ************* *************-xenU #2 SMP Wed Aug 15 17:27:36 SAST 2007 x86_64 x86_64 x86_64 GNU/Linux
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)

I have some PHP code that is reading from an Excel file and doing string comparisons. It is failing on the server due to what seems to be a locale issue. On my local machine (OSX 10.8.5 Mountain Lion) however, it works!

On my local machine the locale is en_US.UTF-8. On the server the locale was POSIX but I changed it to en_US.utf8 since there was no en_US.UTF-8 when I looked at locale -a (interestingly, the list of locales on the server are all lower case but on my Mac they are all upper case, which is where this questions stems from).

Is there a difference between the two that could affect string comparisons?

Also, as per this SF post I ran locale -v -a. On the server, en-US.utf8 uses the UTF-8 codeset (I'm assuming this is the same as what I normally call charset?). However, on my local machine I seem unable to run the locale -v -a command, though locale and locale -a work fine.

Edit: A related question I asked on StackOverflow.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

No difference. They are one and the same.

share|improve this answer
    
Thanks for the answer - do you have anything to support this? I realize it might just be a naming convention and there might be no docs. Thanks! –  Matthew Herbst Aug 1 at 0:23
    
Its just a naming convention. Expand both into their human-lang equivs: 'United States English, using the UTF-8 Charset' == 'United States English, using the UTF-8 Charset' –  Joe Sniderman Aug 1 at 0:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.