How Mono gets its CultureInfo
Recently, we had a core NUnit test failing on Mono/Linux. It was expecting the CultureInfo to be set to a certain pattern of string (xx-XX, or [a-z][a-z]-[A-Z][A-Z]), but when I ran it, it was coming back blank.
Since CultureInfo is something that is usually read from the underlying OS, I inquired on the Mono list about it. It turns out that Mono checks two environment variables -
Since CultureInfo is something that is usually read from the underlying OS, I inquired on the Mono list about it. It turns out that Mono checks two environment variables -
LANG and LC_ALL. So in order to get Mono to see your language culture - do:foyc@dilbert $ LANG=en_US
foyc@dilbert $ EXPORT LANG
foyc@dilvert $ echo $LANG
en_US




0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home