Menu

#5 German Umlaute in String

open
nobody
None
5
2004-09-29
2004-09-29
Anonymous
No

Hi

There is a Problem with German Umlaute in Strings with
your Serializer Class. If there are 3 Ascii Chars in
the String greater than 128, 3 Chars at the end of the
String were cutted. I think you have to change the
following lines:
if (cstr.charCodeAt (i + 5) > 128)
{
j = j - 1;
}

Do not subtract only 1 not 2.

Regards
Christoph

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I have submitted a fix for this. MBCS for unserializing was
    broken.

     
  • Digi D.

    Digi D. - 2005-04-20

    Logged In: YES
    user_id=1263115

    I have problems with German Umlaute in Version 2.1.4 too.
    3 chars at the end of the string were cutted.
    I could solve the problem with the following changes:
    but it is possible that there will be new problems.
    maybe someone can explain what the following lines are for.

    if (cstr.charCodeAt (i + 5) > 128)
    {
    if(cstr.charCodeAt(i + 5) > 255)
    {
    j = j - 2
    } else
    {
    j = j - 0; //-1
    }
    }

    thanx digi d.

     

Log in to post a comment.