peterkalinowska 0 Posted February 3, 2022 Share Posted February 3, 2022 (edited) 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 August 17, 2022 by Metin2 Dev Core X - External 2 Internal fun Link to comment Share on other sites More sharing options...
Management AZICKO 7403 Posted February 3, 2022 Management Share Posted February 3, 2022 Thanks, moved in Q&A Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
peterkalinowska 0 Posted February 4, 2022 Author Share Posted February 4, 2022 (edited) 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 locale.cfg 10000 1252 en Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal fun Link to comment Share on other sites More sharing options...
Premium masodikbela 1367 Posted February 4, 2022 Premium Share Posted February 4, 2022 (edited) 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 February 4, 2022 by masodikbela 1 The one and only UI programming guideline Link to comment Share on other sites More sharing options...
peterkalinowska 0 Posted February 4, 2022 Author Share Posted February 4, 2022 I would like to have the client completely in UTF-8. what do I have to do to make the client UTF-8 4-byte code page work? can you help me reprogram the client to UTF-8? fun Link to comment Share on other sites More sharing options...
peterkalinowska 0 Posted February 5, 2022 Author Share Posted February 5, 2022 (edited) and how can i use the special characters in the game I want to switch from ANSI to UTF-8 Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal fun Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now