File name completion on Mac OS X with German umlauts
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
File name completion on Mac OS X with German umlauts         


Author: Markus
Date: Mar 9, 2008 04:53

Hi,

I'm using a German Mac OS X 10.5.2. I wanted to open a file
called "rückerstattung.txt". So I typed C-x C-f rü ... but
it didn't work. I thought this was a bug in Aquamacs, but then I
tried to do the same with that console emacs which is bundled
with Mac OS X 10.5. Same issue.

Then, I remembered that some time ago, I had the same issue
within Terminal where typing "rü" didn't autocomplete the
file name.

So, can't the autocomplete within Emacs work because it doesn't
work under Terminal?

I assume there must be an Emacs guru around who is running a
German Mac who can help me out with this annoying behaviour.

Thanks in advance,
Markus
33 Comments
Re: File name completion on Mac OS X with German umlauts         


Author: Peter Dyballa
Date: Mar 9, 2008 07:39

Am 09.03.2008 um 12:53 schrieb Markus:
> I'm using a German Mac OS X 10.5.2. I wanted to open a file called
> "rückerstattung.txt". So I typed C-x C-f rü ... but it didn't
> work. I thought this was a bug in Aquamacs, but then I tried to do
> the same with that console emacs which is bundled with Mac OS X
> 10.5. Same issue.

Did you check that both are the same version?

You could launch Aquamacs Emacs in Terminal, too:

/Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs -nw
>
> Then, I remembered that some time ago, I had the same issue within
> Terminal where typing "rü" didn't autocomplete the file name.

File a bug report at apple: https://bugreport.apple.com/cgi-bin/
WebObjects/RadarWeb.woa
>
> So, can't the autocomplete within Emacs work because it doesn't
> work under Terminal?
Show full article (1.54Kb)
no comments
Re: File name completion on Mac OS X with German umlauts         


Author: Nikolaj Schumacher
Date: Mar 9, 2008 08:22

Markus wrote:
> Hi,
>
> I'm using a German Mac OS X 10.5.2. I wanted to open a file called
> "rückerstattung.txt". So I typed C-x C-f rü ... but it didn't work. I
> thought this was a bug in Aquamacs, but then I tried to do the same with that
> console emacs which is bundled with Mac OS X 10.5. Same issue.

The reason is simple. OSX uses a less common formatting for umlauts.
Instead of the code for the character ü it represents it as two
characters, one for u and one for the dots. (Yes, that is still valid
Unicode.)

In fact, if you type "ru", Emacs and Bash will both offer rückerstattung as a
completion.

That being said, I don't know any solution. I thought utf8-m.el would
fix it, but I must have been mistaken. It's one of the cases where
UTF-8 isn't backwards compatible with ASCII when comparing strings, so
the fix is non-trivial.

regards,
Nikolaj Schumacher
no comments
Re: File name completion on Mac OS X with German umlauts         


Author: Markus
Date: Mar 9, 2008 14:44

Peter Dyballa schrieb:
>
> Am 09.03.2008 um 12:53 schrieb Markus:
>
>> I'm using a German Mac OS X 10.5.2. I wanted to open a file called
>> "rückerstattung.txt". So I typed C-x C-f rü ... but it didn't
>> work. I thought this was a bug in Aquamacs, but then I tried to do the
>> same with that console emacs which is bundled with Mac OS X 10.5. Same
>> issue.
>
> Did you check that both are the same version?

No, they are not: the "default" Emacs is GNU Emacs 22.1.1,
Aquamacs is GNU Emacs 22.1.91.2. But I have that issue with *any*
Emacs built for Mac OS X that is out there for OS X 10.4/10.5.
> You could launch Aquamacs Emacs in Terminal, too:
>
> /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs -nw

Here, typing ü yields to ??
Show full article (2.05Kb)
no comments
Re: File name completion on Mac OS X with German umlauts         


Author: Markus
Date: Mar 9, 2008 14:47

Nikolaj Schumacher schrieb:
> That being said, I don't know any solution. I thought utf8-m.el would
> fix it, but I must have been mistaken. It's one of the cases where
> UTF-8 isn't backwards compatible with ASCII when comparing strings, so
> the fix is non-trivial.

Thanks for your reply. But I guess this is maybe not only an
Emacs bug, but also one in Mac OS X. In the recent years, Linux
finally succeeded in dealing with umlauts well. But I quit Linux
three years ago for the Mac ... I didn't expect such annoying
things to reappear :-(

Markus
no comments
Re: File name completion on Mac OS X with German umlauts         


Author: Peter Dyballa
Date: Mar 9, 2008 16:21

Am 09.03.2008 um 22:44 schrieb Markus:
>> You could launch Aquamacs Emacs in Terminal, too:
>> /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\
>> Emacs -nw
>
> Here, typing ü yields to ??

Is Terminal set into UTF-8 encoding? Is Aquamacs Emacs set into UTF-8
"mood?" What value have LC_CTYPE or LANG in Terminal's shell
environment? And finally: the Emacsen before 23.0.60 only "emulate"
UTF-8 somehow.

You might try again, adding also a -Q to the invocation, with
Terminal in some ISO Latin encoding (ISO 8859-15 for example) and
also set LC_CTYPE to this value.
Show full article (1.86Kb)
10 Comments
Re: File name completion on Mac OS X with German umlauts         


Author: Markus
Date: Mar 10, 2008 11:57

>>> You could launch Aquamacs Emacs in Terminal, too:
>>> /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\
>>> Emacs -nw
>>
>> Here, typing ü yields to ??
>
> Is Terminal set into UTF-8 encoding?

Yes, I'm using the default settings of Mac OS X 10.5.

I just found out that I get the ü correctly displayed when
invoking Aquamacs like this: emacs -nw -Q
> Is Aquamacs Emacs set into UTF-8 "mood?"

How can I find that out?
> What value have LC_CTYPE or LANG in Terminal's shell
> environment?
Show full article (2.27Kb)
no comments
Untitled         


Author: Peter Dyballa
Date: Mar 10, 2008 14:01

8 Comments
Re: File name completion on Mac OS X with German umlauts         


Author: Markus
Date: Mar 10, 2008 14:25

>>> Is Aquamacs Emacs set into UTF-8 "mood?"
>
> Mode-line! It should start in the left corner with -u:. You press with
> the mouse cursor on the symbol between - and : ...

Err, my mode-line looks like this: 1:-- rückerstattung.txt

When hovering the 1, the tool tip says: iso-latin-1-unix buffer

But this tells you about the encoding of the file content, not
its name, I guess!
> My test file, since Jaguar (?), is called ���... No file name completion
> starts for me.

Hmmm, in the carbon copy e-mail that I got from your reply, I saw
that your file was called äöü ... and not ??? ... I guess your
message didn't make the UTF-8 way to this newsgroup ...???
> The shell in Terminal uses a different mechanism for file name
> completion than GNU Emacs. Is this the answer you wanted to read? Both
> mechanisms choose from the same pool of HFS+ decomposed and deranged
> character strings.

I see. Same issue, some implications!
Show full article (1.37Kb)
no comments
Re: File name completion on Mac OS X with German umlauts         


Author: Peter Dyballa
Date: Mar 10, 2008 15:49

Am 10.03.2008 um 22:25 schrieb Markus:
> Err, my mode-line looks like this: 1:-- rückerstattung.txt
>
> When hovering the 1, the tool tip says: iso-latin-1-unix buffer
>
> But this tells you about the encoding of the file content, not its
> name, I guess!

Not really! GNU Emacs reads the contents of the file in cold blood.
Then, according to the encoding set or chosen, it *presents* this
pile of bytes as a bunch of glyphs taken from the font used. The
encoding maps one or more bytes to a single character. Each such
character has its distinct character code. According to this the
glyph is chosen from the font and displayed.

The encoding of the file contents can be "encoded" (better: recorded
or saved) in a local variable inside the file ... as an option.

A byte \327 (octal, 215 dec, D7 hex) represents in most ISO 8859
encodings (1, 2, 3, 4, 9, 13, 15) the MULTIPLICATION SIGN at U+00D7
(in UTF-8 it's encoded as the two bytes C3 97). The same byte is
Show full article (3.47Kb)
6 Comments
1 2 3 4