> -----Ursprüngliche Nachricht----- > Von: [email protected] [mailto:[email protected]] Im Auftrag > von Tony Mechelynck > Gesendet: Mittwoch, 14. Dezember 2011 05.03 > An: Paul Maier > Cc: [email protected] > Betreff: Re: AW: AW: call to iconv(...) missing somewhere in the code? > > see my interspersed comments, especially at the bottom > > > On 13/12/11 11:50, Paul Maier wrote: > > > >>>>> Hi, > >>>>> > >>>>> German message output is broken when encoding=UTF-8. > >>>>> Maybe calls to convert messages to the current encoding (see :help > >>>>> iconv) are missing in the > code? > >>>>> > >>>>> To reproduce here are 2 examples among many others: > >>>>> > >>>>> > >>>>> 1. example: > >>>>> > >>>>> - open new gvim > >>>>> - :set enc=UTF-8 > >>>>> - :set enc=lalala ... something invalid > >>>>> > >>>>> I get: > >>>>> E474: Ung<fc>ltiges Argument: enc=lalala > >>>>> I expect: > >>>>> E474: Ungültiges Argument: enc=lalala > >>>>> > >>>>> > >>>>> 2. example: > >>>>> > >>>>> - open new gvim > >>>>> - :set enc=UTF-8 > >>>>> - :set bomb > >>>>> - i<Enter><Esc> ... enter a newline to make the buffer not > >>>>> empty > >>>>> - g<C-G> ... g CONTROL-G > >>>>> > >>>>> I get: > >>>>> Sp 1 von 0; Zeile 2 von 2; Wort 0 von 0; Byte 4 von 4(+3 f<fc>r > >>>>> BOM) > >>>>> I expect: > >>>>> Sp 1 von 0; Zeile 2 von 2; Wort 0 von 0; Byte 4 von 4(+3 für BOM) > >>>>> > >>>>> > >>>>> I use: > >>>>> > >>>>> :version > >>>>> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02) > >>>>> MS-Windows 32 Bit GUI Version mit OLE-Unterstützung > >>>>> Inklusive der Korrekturen: 1-46 > >>>>> Übersetzt von Bram@KIBAALE > >>>>> > >>>>> > >>>>> When enc is latin1, all messages display fine. > >>>>> > >>>>> Thanks& regards, > >>>>> Paul > >>>>> > >>>>> > >>>> > >>>> If you were running under Linux I would suggest > >>>> > >>>> lang mess de_DE.UTF-8 > >>>> > >>>> but beware that the placement of this command before or after not only > >>>> ":set enc=utf-8" but also ":filetype [plugin] [indent] on" and ":syntax > >>>> on" (and the relative placement of these) makes a difference. > >>>> > >>>> Under Windows I'm less sure; maybe something like > >>>> > >>>> lang mess German_Germany.10646 > >>>> > >>>> Same caveats as above about command ordering. > >>>> > >>>> > >>> > >>> > >>> Hi! > >>> > >>> Sorry, your hint didn't change anything, but I found, that it's working > >>> for Spanish: > >>> > >>> :set enc=utf-8 > >>> :lang mess es > >>> Este es el cambio más nuevo > >>> => WORKS FINE! "á" (Hex 00e1) is printed out fine. > >>> > >>> :lang mess fr > >>> D<e9>j<e0> <e0> la modification la plus r<e9>cente > >>> :lang mess de > >>> Bereits bei der j<fc>ngsten<c4>nderung > >>> => ENCODING PROBLEMS! > >>> > >>> > >>> But when I set to :enc=latin1, then it's VICE VERSA: > >>> German and French working, but Spanish not: > >>> > >>> :set enc=latin1 > >>> :lang mess es > >>> Este es el cambio más nuevo > >>> => Looks like UTF-8 here. > >>> > >>> > >>> Are the messages for German and French coded in latin1, > >>> and for Spanish in UTF-8? > >>> > >>> I agree, there needs to be some translation from the encoding of the > >>> message > >>> to the encoding currently in use. > >>> But how? > >>> Is it something that I can configure, or is it a vim coding problem? > >>> > >>> I found out that in Cygwin's vim and Cygwin's gvim the German messages > >>> display > >>> fine for both settings, enc=utf-8 and enc=latin1 (without that I did > >>> anything). > >>> > >>> Thanks& Regards, > >>> Paul > >>> > >>> > >>> > >> > >> Did you try the _full_ three-part locale, language_COUNTRY.encoding, > >> where (IIUC) under Windows "encoding" is a numeric codepage, 10646 for > >> Unicode? For German, my guess was > >> > >> lang mess German_Germany.10646 > >> > >> where 10646 (from ISO/IEC 10646) is the Windows codepage for Unicode. > >> Did you try it? Did you try varying the order of > >> > >> :language messages ... > >> :set enc=... > >> :filetype ... > >> :syntax on > >> > >> ? (The latter two set up the menus, which are also influenced by the > >> "messages" language.) > >> > >> N.B. When I was on Windows some years ago, my system locale (as set by > >> the OS) was French_Belgium.1252 — hence my suggestion above. > >> > > > > > > Hi Tony, > > > > yes I checked the full locale "lang mess German_Germany.10646" and I > > checked it > > again, but sorry, no effect. > > The system seems to understand "German_Germany.10646" (because when I enter > > nonsense > > it says so), but when I afterwards query the language with "lang mess" it > > just > > outputs "de" (see below). > > maybe try the same for :lang ctype > I'm not sure > > > > > I also played around with different combinations of filetypes and syntax > > commands, > > but no effect. > > First enc, then mess: see my last mail. Other orders: see below. > > > > Full transcript of my session follows. > > There I use :later to produce an error message with German umlaut > > characters in it. > > > > > > # initial state: latin1, working > > > > :set enc? > > encoding=latin1 > > :lang mess > > Momentane messages Sprache: "de_DE.CP1252" > > :later > > Bereits bei der jüngsten Änderung > > > > # ok, let's begin. > > # first "mess" then "enc": > > > > :lang mess German_Germany.10646 > > :lang mess > > Momentane messages Sprache: "de" > > :set enc=utf-8 > > :later > > Bereits bei der j<fc>ngsten<c4>nderung > > > > # "syntax", then again "mess" > > > > :syntax > > Keine Syntax-Elemente f<fc>r diesen Puffer definiert > > :syntax on > > ??? > > Just :syntax on by itself should not give an error (and neither should > :set ft=dos BTW). See :help :syntax-on > > When I do :syntax with no arguments in an empty buffer, I get > > No syntax items defined for this buffer > > which is not an error. You could also do > > :filetype > :let syntax_on > > (both of them with no additional arguments) to see if syntax > highlighting is currently on (the first command too because if filetype > detection is off, Vim won't set 'syntax' on newly opened files) > > > E749: Leerer Puffer > > :syntax > > Keine Syntax-Elemente f<fc>r diesen Puffer definiert > > :lang mess > > Momentane messages Sprache: "de" > > :lang mess German_Germany.10646 > > :lang mess > > Momentane messages Sprache: "de" > > :later > > Bereits bei der j<fc>ngsten<c4>nderung > > > > # set filetype, then again "mess" > > Not :set filetype, just :filetype, as in one of the following: > > :filetype on > :filetype plugin on > :filetype plugin indent on > :filetype indent on > > > > > :set filetype? > > filetype= > > :set filetype=dos > > E749: Leerer Puffer > > :set filetype? > > filetype=dos > > :later > > Bereits bei der j<fc>ngsten<c4>nderung > > :set enc=latin1 > > :later > > Bereits bei der jüngsten Änderung > > :set enc=utf-8 > > :later > > Bereits bei der j<fc>ngsten<c4>nderung > > :lang mess German_Germany.10646 > > :later > > Bereits bei der j<fc>ngsten<c4>nderung > > :set enc=utf-8 > > :later > > Bereits bei der j<fc>ngsten<c4>nderung > > > > > > Thank you, > > Paul > > > > > > > > I see. Well, I can't help you then, unless you hit a bug which was fixed > between your version (7.3.046) and the latest one (7.3.372). > > You can get a recent (and regularly updated) version of Vim for Windows > from http://sourceforge.net/projects/cream/files/Vim/ — this is what > this list's regulars mean when they talk of "Vim without Cream". It is > compiled from the official sources, but not by Bram himself, and > possibly by means of a different C/C++ compiler; it ought to work just > as well as Bram's executable on any Windows system (and maybe better > since bugfixes are incorporated more often). >
Hi Tony, here is the output of your suggestions (the first line is just hit enter without any command): : E749: Leerer Puffer :set enc=utf-8 :lang ctype Momentane ctype Sprache: "C" :lang ctype German_Germany.10646 E197: Sprache kann nicht auf "German_Germany.10646" gesetzt werden :filetype filetype detection:ON plugin:OFF indent:OFF :set filetype=dos E749: Leerer Puffer :filetype filetype detection:ON plugin:OFF indent:OFF :let syntax_on E121: Undefinierte Variable: syntax_on :syntax on E749: Leerer Puffer :let syntax_on syntax_on #1 :lang mess German_Germany.10646 :later Bereits bei der j<fc>ngsten <c4>nderung :lang ctype German_Germany.10646 E197: Sprache kann nicht auf "German_Germany.10646" gesetzt werden It sounds like a bug to me. Exists there an issue tracker? Thanks & regards, Paul -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
