in reply to Correct Locale for brazilian portuguese (or French!)

To be honest, that depends on what platform you're on. Try running "locale -a" to get a list of all the locales supported by your platform. I didn't install Brazilian Portuguese on my Linux box, so I can't easily check what locale that is for Gentoo. :-)

It is so bad that our product has created a huge mapping of tonnes of locale names to platform-specific locale tokens just to try to simplify our install and use of all the encodings and languages. And, yes, pt_BR is among them. On a few platforms.

  • Comment on Re: Correct Locale for brazilian portuguese (or French!)

Replies are listed 'Best First'.
Re^2: Correct Locale for brazilian portuguese (or French!)
by Andre_br (Pilgrim) on Jun 20, 2005 at 23:33 UTC
    I issued the command you said, and I have all these:
    pt_BR pt_BR.iso88591 pt_BR.utf8 pt_PT pt_PT@euro pt_PT.iso88591 pt_PT.iso885915@euro pt_PT.utf8
    I am using the pt_PT.iso88591 that it works with a string I type in the cgi script but does not in a string extracted from a .xls file with the Spreadsheet::ParseExcel module. How come??

      You probably need to encode/decode whatever encoding that XLS is using. Most likely, it's UTF8. So you should probably check the Encode module to decode from utf8 to pt_BR.iso88591.

      Remember - just because you're running in a locale doesn't mean the data you're reading is in that locale. :-)