Menu

Problems with german characters

Help
2006-09-19
2013-04-17
  • Michael Lesniak

    Michael Lesniak - 2006-09-19

    Hello,

    even though I've read the thread in the mailing list, that everything *should* work fine, it doesn't :). I'm using Ubuntu Dapper 6.06.1, libreadline-java  0.8.

    Everytime I use a german umlaut, e.g. in the word fünf, the result returned is fünf.

    Any ideas on possible misconfigurations on my side?

    Thanks
      Michael

     
  • deepcored

    deepcored - 2010-07-28

    Hi,

    I've had similar issues with all unicode characters. Digging up the source code I came across an internal UTF-UCS converter. Apparently this conversion must be done if you are running your app on windows. And this should not be done on a linux machine.  I've made a very simple patch which skips charset conversion:

    diff -Naur ./src/native/org_gnu_readline_Readline.c ../../libreadline-java-0.8.0/src/native/org_gnu_readline_Readline.c
    --- ./src/native/org_gnu_readline_Readline.c    2003-01-07 20:14:35.000000000 +1000
    +++ ../../libreadline-java-0.8.0/src/native/org_gnu_readline_Readline.c 2010-07-28 16:20:37.433083185 +1000
    @@ -576,6 +576,8 @@
           return NULL;
       }
    
    +  strcpy(buffer, utf8); return buffer;
    +
       for (i=0,pin=utf8,pout=buffer; i<bufLength && *pin; i++,pin++,pout++) {
         current = *pin;
         if (current >= 0xE0) {                   /* we support only two-byte utf8 */
    @@ -613,6 +615,8 @@
           return NULL;
       }
    
    +  strcpy(buffer, ucs); return buffer;
    +
       for (i=0,pin=ucs,pout=buffer; i<bufLength && *pin; i++,pin++,pout++) {
         current = *pin;
         if (current < 0x80)                      /* one-byte utf8                 */
    

    Hope that helps,
    Evgeny.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.