On Mon, May 04, 2009 at 05:05:34PM -0300, Luis A. Florit wrote: > I use a ISO-8859-1 encoded xterm in maemo, but :set ?charset > gives me charset="utf-8". I tried setting by hand LANG, LC_ALL, > LC_CTYPE to pt_BR and such, but no luck. No, pt_BR.ISO-8859-1 is not > among the xterm locales. What about pt_PT? If you have no supported Portugese locales, you may be out of luck. But I think ISO-8895-1 locales should contain all the characters specified therein, so you might be able to get by with French or Spanish, if you can't get Portugese working... In general, just set LANG... all the other vars inherit its value unless you set them explicitly. Avoid doing that unless you have a good reason (and know what you're doing). Your locales MUST match in mutt and xterm. If one was started with a different locale than the other, then you'll almost certainly run into problems. In general, if you're on a machine that only you use, the easiest way to do this is to make sure the machine's default locale is whatever you want to use, and avoid setting it in your login files (of course, it must be supported by the operating system)... I'm not familiar with Maemo; I can't offer any advice about how to do that in your case. You will also need to make sure that your xterm uses a font that contains the characters you need, BTW. The configuration of that is again separate (yay!) and may cause additional headaches. As a side note, why not just use UTF-8? Given your symptoms, it seems to be supported, and in general is the ideal encoding, since it allows virtually any character set to be encoded and displayed, assuming the fonts (or more accurately, the glyphs for the characters you want) are available. > I also tried setting charset, config_charset and assumed_charset to > ISO-8859-1, in the beginning and end of .muttrc, with no luck... Changing the settings in Mutt is virtually always the wrong thing... Hope that helps. [Footnote: there are legitimate reasons to want to set the LC_* variables in addition to LANG. For example, some software expects sorting to be in ASCII-betical order, but using a UTF-8 makes the sort priority of 'A' and 'a' the same, and changes the sort order of punctuation, etc. This tends to break things, esp. in the context of old shell scripts. In order to get around this, I set the following: LANG=en_US.UTF-8 LC_COLLATE=C This allows me to use UTF-8, but keep the ancient pre-UTF sort order that ASCII imposed. I happen to prefer this anyway, in part because I usually name directories with a capital letter, and files without capital letters, in order to keep them (mostly) separated in the output of ls, as I've been doing for years... But setting these variables to conflicting values can cause problems too, if you don't know what you're doing.] -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
Attachment:
pgpODDFFu1Rak.pgp
Description: PGP signature