2
I been bugging with this problem for some hours now. And I couldn't find the answer on google so I try it here.
The problem is that when I run emacs in cygwin in -nw
mode characters like åäö doesn't come out normally. However it is perfectly normal when I type those character in mintty terminal. The answer that I found on google is that I should type M-x standard-display-european
however emacs doesn't have that option. It only found standard-display-cyrillic-translit
What exactly does go wrong with those characters? Does it affect newly created files or existing files? – ak2 – 2011-01-07T10:43:24.153
And which Cygwin version are you using? (
uname -r
will tell you.) – ak2 – 2011-01-07T11:55:39.383@ak - i'm using 1.7.x. Those character will show up as blocks. It will show as blocks when I use
cat
as well. – starcorn – 2011-01-07T12:32:23.597Right. So are you looking at an existing file there? It probably means that that file is encoded in a legacy encoding such as ISO-8859-1 or CP1252, whereas Cygwin 1.7 uses UTF-8 (i.e. Unicode) by default. Can you type the special characters when creating a new file in emacs? – ak2 – 2011-01-07T12:55:13.303
@ak - I have tried both. When creating a new file with emacs (cygwin) and when I type in those characters it will show as blocks. However when I open the file with notepad (windows) it will be viewed as correct characters. – starcorn – 2011-01-07T13:10:24.640
2Hmm. Where are you running emacs? In mintty or in the default console? If the latter, try choosing a TrueType font such as Lucida Console in the console properties. – ak2 – 2011-01-07T13:18:57.050
@ak - i'm using mintty which I have set from beginning to use Consolas. Now I have also tried with using Lucida Console on mintty and the default console with the same result. It still print blocks in emacs, but
åäö
is viewed perfectly ok when typing on the console. However I get \303\245 as response from bash when I hit enter afterå
– starcorn – 2011-01-07T14:24:26.8831That looks like inconsistent charset settings then. What are locale and character set on the Text page of mintty's options set to, and what are the values of the
LC_ALL
,LC_CTYPE
, andLANG
environment variables? Are you setting those variables in bash startup files? If so, don't, because the terminal won't get to know about it. – ak2 – 2011-01-07T16:00:10.077It works fine for me. What does
locale
output? – Paused until further notice. – 2011-01-07T19:04:17.300Yep, works fine for me too. Another question: are you actually using Cygwin emacs, and are you doing anything charset-related in emacs settings? – ak2 – 2011-01-07T21:38:03.113
when typing
locale
I get C.UTF-8 for every variable except forLC_ALL
. I haven't set anything that I am aware of that will change the locale when I start up bash. I had some few lines in.inputrc
before e.g.set meta-flag on
but I have removed them now. – starcorn – 2011-01-07T22:25:52.403@ak2 - yes I am using cygwin emacs. I installed it using the setup file downloaded from cygwin. – starcorn – 2011-01-07T22:31:17.097
works for me. cygwin 1.7.9, emacs 23.3.1, mintty 1.0.1 http://i.imgur.com/sCmS9.png
– serbaut – 2011-10-19T10:20:31.533