cinntique Posted December 14, 2018 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 1 Reputation: 0 Joined: 12/10/18 Last Seen: December 29, 2018 Share Posted December 14, 2018 I found a problem with this function (src/common/strlib.cpp : normalize_name) I am a Korean. So I wanted to create a character name in Korean. after a long trial, I realized that Ragnarok client encode strings with ISO-8859-1. So, in inter_conf.txt, I set the default_codepage to euc-kr. But, I couldn't create a character name with '강' and '서'. These words have been converted to '?'. char* normalize_name(char* str,const char* delims) { char* in = str; char* out = str; int put_space = 0; if( str == NULL || delims == NULL ) return str; // trim start of string while( *in && strchr(delims,*in) ) ++in; while( *in ) { if( put_space ) {// replace trim characters with a single space *out = ' '; ++out; } // copy non trim characters while( *in && !strchr(delims,*in) ) { *out = *in; ++out; ++in; } // skip trim characters while( *in && strchr(delims,*in) ) ++in; put_space = 1; } *out = '\0'; return str; } I checked that it worked as normal when the above function was removed. But I'm not an expert on C++ so I don't know how to fix it. Can someone help me? Quote Link to comment Share on other sites More sharing options...
anacondaq Posted December 14, 2018 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 1096 Reputation: 345 Joined: 02/26/12 Last Seen: May 30, 2023 Share Posted December 14, 2018 (edited) 1. Your clientinfo.xml config should have next: <servicetype>korea</servicetype> <langtype>0</langtype> 2. Now, you need to configure MySQL server (or MariaDB, or whatever you have) Options what is interesting for you is next: [client] default-character-set = utf8mb4 [mysql] default-character-set = utf8mb4 [mysqld] character_set_server=utf8mb4 collation_server=utf8mb4_unicode_ci 3. Now, create a new database after applying these settings. Will be created a database, with correct encoding (as far as I remember utf8mb4 support Korean characters pretty well). 4. Now, import your SQL files there, like you always do. (main.sql, logs.sql, etc) 5. Now, open your inter_athena.conf and find next option and make them hardcoded info what charset to use: // You can specify the codepage to use in your MySQL tables here. // (Note that this feature requires MySQL 4.1+) default_codepage: utf8mb4 At this point everything will be okay, but depends on a lot of differences between a lot of charsets default in different regional operation system with national languages, charsets of the windows can be different, 1252, 1251, etc. 6. You can manually force a client to use utf8 For that, you need to download dininput.dll & ini file: DOWNLOAD DININPUT or ALTERNATIVE LINK if the previous one will die. 7. And now run your client and play. Everything should be good. Edited December 14, 2018 by Anacondaqq Quote Link to comment Share on other sites More sharing options...
casper Posted April 16, 2023 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 35 Reputation: 2 Joined: 02/15/13 Last Seen: December 26, 2023 Share Posted April 16, 2023 (edited) default_codepage: utf8mb4 mysql => utf8mb4_unicode_ci clinent => dininput.dll & ini Three of the four characters look like this: ??? Edited April 16, 2023 by casper Quote Link to comment Share on other sites More sharing options...
casper Posted April 16, 2023 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 35 Reputation: 2 Joined: 02/15/13 Last Seen: December 26, 2023 Share Posted April 16, 2023 On 12/15/2018 at 2:46 AM, anacondaq said: help me... 1. Your clientinfo.xml config should have next: <servicetype>korea</servicetype> <langtype>0</langtype> 2. Now, you need to configure MySQL server (or MariaDB, or whatever you have) Options what is interesting for you is next: [client] default-character-set = utf8mb4 [mysql] default-character-set = utf8mb4 [mysqld] character_set_server=utf8mb4 collation_server=utf8mb4_unicode_ci 3. Now, create a new database after applying these settings. Will be created a database, with correct encoding (as far as I remember utf8mb4 support Korean characters pretty well). 4. Now, import your SQL files there, like you always do. (main.sql, logs.sql, etc) 5. Now, open your inter_athena.conf and find next option and make them hardcoded info what charset to use: // You can specify the codepage to use in your MySQL tables here. // (Note that this feature requires MySQL 4.1+) default_codepage: utf8mb4 At this point everything will be okay, but depends on a lot of differences between a lot of charsets default in different regional operation system with national languages, charsets of the windows can be different, 1252, 1251, etc. 6. You can manually force a client to use utf8 For that, you need to download dininput.dll & ini file: DOWNLOAD DININPUT or ALTERNATIVE LINK if the previous one will die. 7. And now run your client and play. Everything should be good. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.