Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

[Frage/Hilfe] Metin2 von latin1 windows1252 umprogrammieren auf UTF-8



Good day

I have a question, does anyone know how to reprogram the encoding from windows1252, latin1 to UTF-8 in the client?

I have set table account to UTF-8 (utf8mb4, utf8mb4_unicode_ci) on the MySQL server.

When I log into the client, I would like to use umlauts or other languages for the login data, e.g. (ÖÄÜ 정 추가.اختبار)

I know that the client can only work with windows1252, latin1, so you have to change something in the src c++ client I hope you could help me with this problem, thank you




Gutan Tag

Ich habe mal ne frage weist jemand wie man im Client die Codierung von windows1252, latin1 auf UTF-8 umprogrammieren kann?


Ich habe auf dem MySQL Server Tabelle Account auf UTF-8 (utf8mb4, utf8mb4_unicode_ci) eingestellt.

Wenn ich mich in den Client einloge, möchte ich gerne bei den Logindaten umlaute sonderzeichen oder andere sprachen benutzen z.b (ÖÄÜ 정 추가.اختبار)

ich weis das der client nur windows1252, latin1 umgehen kann da muss man bestimmt irgendwas im src c++ Client ändern

ich hoffe ihr konnt mir bei diesen problem helfen danke



Edited by Metin2 Dev
Core X - External 2 Internal


Link to comment
Share on other sites

  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0

Picture 1: cannot enter all characters

Picture 2: ID and password are correct but I can't login

Picture 3: Login only works if I replace (Ü) with (U), then I can login

10000 1252 en





Edited by Metin2 Dev
Core X - External 2 Internal


Link to comment
Share on other sites

  • 0
  • Premium

Can you clarify your goal a little bit? So first of all you must know that by default the client will only be able to display characters from the selected codepage (and ofc these characters must be present in the font aswell). What it means that the client will always threat 1 byte of string as a single representable character, while a unicode codepoint can take up to 4 bytes of string (in utf8).

If you just want to be able to login even tho its not displayed correctly, you can just use for example boost locale (boost::locale::conv::to_utf) with the codepage used on the string, to get a valid unicode string, and then send it to the server for comparison (note that you might have to do normalization on the string to make sure its in the same normalization form as the saved text in the database (in this case probably NFD would be a better choice because we want an exact match of codepoints used and not the physical result of the composed character)). This can be done with utf8proc for example.

If you want to display characters correctly aswell, then you will have to completely rework the TextLine class and use sophisticated typography processors like uniscribe or directwrite(dx10+) or harfbuzz+fribidi+freetype.

Edited by masodikbela

The one and only UI programming guideline

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Activity

    1. 0

      Need Help With Char_Item.cpp

    2. 0


    3. 7

      Killua - Unholy God Set

    4. 2

      Visual studio 2022 compiling issue

    5. 991

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • Recently Browsing

    • No registered users viewing this page.
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.