On 12/12/11 19:02, Paul Maier wrote:


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von 
Tony Mechelynck
Gesendet: Sonntag, 11. Dezember 2011 15.11
An: [email protected]
Cc: Paul Maier
Betreff: Re: call to iconv(...) missing somewhere in the code?

On 11/12/11 13:14, 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.


Best regards,
Tony.
--
Who's on first?

--
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

Reply via email to