#507 Cannot enter non-ASCII characters when in UTF-8 locale

release
closed-invalid
nobody
Program (402)
6
2006-02-13
2006-01-16
Thorsten Haude
No

I cannot enter non-ASCII characters in NEdit. Whenever
I try, I get something unicody. This should be 'äöüß\n':
haude@dbnu034 % od -x ~/unicode
0000000 a4c3 b6c3 bcc3 9fc3 000a
0000011

Enhanced NEdit 5.5
Nov 24, 2005

Built on: Linux, 486, GNU C
Built at: Jan 2 2006, 20:46:10
With Motif: 2.2.3 [@(#)Motif Version 2.2.3]
Running Motif: 2.2 [@(#)Motif Version 2.2.3]
Server: The XFree86 Project, Inc 40399902
Visual: 16-bit TrueColor (ID 0x23, Default)
Locale: en_US.UTF-8

(I currently cannot compile with any other Motif; I'm
working on it.)

Neither of these versions does show the error:
SLES 9.2:
NEdit 5.5
Sep 30, 2004

Built on: Linux, 386, GNU C
Built at: Jan 14 2005, 15:56:54
With Motif: 2.2.2 [@(#)Motif Version 2.2.2] (KNOWN-BAD)
Running Motif: 2.2 [unknown]
Server: The XFree86 Project, Inc 40399902
Visual: 16-bit TrueColor (ID 0x23, Default)
Locale: en_US.UTF-8

Stock static binary:
NEdit 5.5
Sep 30, 2004

Built on: Linux, 386, GNU C
Built at: Oct 1 2004, 15:55:40
With Motif: 2.1.30 [@(#)Motif Version 2.1.30]
Running Motif: 2.1 [unknown]
Server: The XFree86 Project, Inc 40399902
Visual: 16-bit TrueColor (ID 0x23, Default)
Locale: en_US.UTF-8

Discussion

  • Thorsten Haude
    Thorsten Haude
    2006-02-13

    Logged In: YES
    user_id=119143

    Obvious workaround: Add menu items for the keys you need.

    Key Helper>ä:Adiaeresis::: {\n\ insert_string("ä")\n\ }\n\ Key Helper>ö:Odiaeresis::: {\n\ insert_string("ö")\n\ }\n\ Key Helper>ü:Udiaeresis::: {\n\ insert_string("ü")\n\ }\n\ Key Helper>Ä:Shift+Adiaeresis::: {\n\ insert_string("Ä")\n\ }\n\ Key Helper>Ö:Shift+Odiaeresis::: {\n\ insert_string("Ö")\n\ }\n\ Key Helper>Ü:Shift+Udiaeresis::: {\n\ insert_string("Ü")\n\ }\n\ Key Helper>ß:Ssharp::: {\n\ insert_string("ß")\n\ }\n

    I cannot change these item in the menu however, I have to
    patch nedit.rc.

     
  • Thorsten Haude
    Thorsten Haude
    2006-02-13

    Logged In: YES
    user_id=119143

    In case you read the characters below as mungled as they
    appear in the mailing list archive: These are the three
    Umlauts, each in upper and lower case and sharp s: ä,
    ö, ü, Ä, Ö, Ü, ß. (Now let's
    see how SF mungles it up.)

     
  • Scott Tringali
    Scott Tringali
    2006-02-13

    Logged In: YES
    user_id=11321

    I'm totally confused to be the "unicode" file. We have
    nothing in the way of unicode.

    All we we do is display stuff in the current font.
    Something has to translate your input into some sort of
    encoding that widget understands (which hopefully matches
    your display font).

    I see you're running in a UTF-8 locale, you may want to run
    in under iso8559-1 (with an appropriate font). Does that
    change anything?

     
  • Scott Tringali
    Scott Tringali
    2006-02-13

    iso8859 test file - pased in from Linux man page

     
    Attachments
  • Thorsten Haude
    Thorsten Haude
    2006-02-13

    Logged In: YES
    user_id=119143

    I know that we (still, lamentably) don't have anything
    unicode. What I see is a two-character representation of the
    character, which if saved and viewed with less(1), is the
    right character.

    I forgot to mention that I already tried cutting off the
    UTF-8, which deactivated the keys completely. What I didn't
    think of (doh) was to use de_DE, which seems to work.

    Another workaround, and a much better one, thanks!

     
  • Scott Tringali
    Scott Tringali
    2006-02-13

    Logged In: YES
    user_id=11321

    Perhaps we need an i18n section in the faq/wiki then? Once
    the vendors moved to a default of UTF8, it has caused plenty
    of problems for us.

    I wish there was a dual setting or fallback, so that we
    could know which non-unicode locale was in the user's best
    interest.

    I think we should close this until we (and Motif) develops
    some UTF8 support.

     
  • Scott Tringali
    Scott Tringali
    2006-02-13

    • milestone: 103147 --> release
    • summary: Cannot enter non-ASCII characters --> Cannot enter non-ASCII characters when in UTF-8 locale
     
  • Thorsten Haude
    Thorsten Haude
    2006-02-13

    Logged In: YES
    user_id=119143

    Agreed, let's close this. Your workaround works fine and
    might even hint that it's not NEdit's problem at all.

     
  • Thorsten Haude
    Thorsten Haude
    2006-02-13

    • status: open --> closed-invalid