Re: UTF-8 input with Terminal.app
- On Tue, Nov 01, 2005 at 06:54:49PM +0000, Charles Collicutt wrote:
> I've done some more investigation and can clarify theHave you tried vim 7.0? I think that some Mac-specific code was
> problem slightly now:
> > When I run Vim with its GUI - by double-clicking the
> > Vim.app icon or using "open -a Vim" - it automatically
> > sets termencoding to "macroman". Vim will then accept
> > UTF-8 input.
> It doesn't actually accept UTF-8 input at all. OS X treats
> Vim.app as a non-Unicode-aware application so sends it input
> according to the Script setting in the International panel
> of System Preferences. So it is actually receiving MacRoman
> input (which fits termencoding) and converting it to UTF-8
> internally as encoding is set to utf-8. Therefore you can't
> actually input anything that isn't in the MacRoman character
> repertoire without using digraphs or i_CTRL-V_digit.
> Terminal.app is treated as being Unicode-aware, so it
> receives UTF-8 input. However, vim seemed to be treating
> this as ISO8859-1 input. So, for example, ä would appear as
> Ã¤ (because ä is C3A4 in UTF-8 while Ã is C3 and ¤ is A4 in
> ISO8859-1.) This turned out to be the fault of a default
> setting in Terminal.app - in the Emulation pane of Window
> Settings there is an option to "Escape non-ASCII characters"
> which is ticked by default. If unticked, UTF-8 input to vim
> works properly.
> So, all that remains is to get OS X to treat Vim.app as a
> Unicode-aware application so UTF-8 input works with the GUI.
added that changes how it deals with Unicode. If you do not feel like
compiling it yourself, you can get a binary at
HTH --Benji Fisher