Всегда помогало.
[Решение] проблемы с кирилицей и MySQL, Исходник
1. Мод установил. заменил старую функцию(закоментировал) и использовал эту. src/common/sql.c
int Sql_SetEncoding(Sql* self, const char* encoding) { int mRetval; StringBuf mBuf; StringBuf_Init(&mBuf); StringBuf_AppendStr( &mBuf, "set names " ); StringBuf_AppendStr( &mBuf, encoding ); mRetval = Sql_QueryStr( self, StringBuf_Value(&mBuf) ); StringBuf_Destroy(&mBuf); return mRetval; }
2. База в cp1251_bin.
3. прописал везде cp1251.
// Athena InterServer configuration. // Contains settings shared/used by more than 1 server. // Options for both versions // Log Inter Connections, etc.? log_inter: 1 // Inter Log Filename inter_log_filename: log/inter.log // Level range for sharing within a party party_share_level: 15 // SQL version options only // You can specify the codepage to use in your mySQL tables here. // (Note that this feature requires MySQL 4.1+) default_codepage: cp1251 // For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1 // Under windows, you want to use 127.0.0.1. If you see a message like // "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" // and you have localhost, switch it to 127.0.0.1 // Global SQL settings // overridden by local settings when the hostname is defined there // (currently only the login-server reads/obeys these settings) sql.db_hostname: 127.0.0.1 sql.db_port: 3306 sql.db_username: root sql.db_password: vertrigo sql.db_database: ragnarok2 sql.codepage: cp1251 // MySQL Character SQL server char_server_ip: 127.0.0.1 char_server_port: 3306 char_server_id: root char_server_pw: vertrigo char_server_db: ragnarok2 // MySQL Map SQL Server map_server_ip: 127.0.0.1 map_server_port: 3306 map_server_id: root map_server_pw: vertrigo map_server_db: ragnarok2 // MySQL Log SQL Database log_db_ip: 127.0.0.1 log_db_port: 3306 log_db_id: root log_db_pw: vertrigo log_db_db: ragnarok2 log_codepage: cp1251 log_login_db: loginlog // MySQL Reconnect Settings // - mysql_reconnect_type: // 1: When MySQL disconnects during runtime, the server tries to reconnect // mysql_reconnect_count times and shuts down if unsuccessful. // 2: When mysql disconnects during runtime, it tries to reconnect indefinitely. mysql_reconnect_type: 2 mysql_reconnect_count: 1 // DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL // this is meant for people who KNOW their stuff, and for some reason want to change their // database layout. [CLOWNISIUS] // ALL MySQL Database Table names // Char Database Tables char_db: char hotkey_db: hotkey scdata_db: sc_data cart_db: cart_inventory inventory_db: inventory charlog_db: charlog storage_db: storage reg_db: global_reg_value skill_db: skill interlog_db: interlog memo_db: memo guild_db: guild guild_alliance_db: guild_alliance guild_castle_db: guild_castle guild_expulsion_db: guild_expulsion guild_member_db: guild_member guild_skill_db: guild_skill guild_position_db: guild_position guild_storage_db: guild_storage party_db: party pet_db: pet friend_db: friends mail_db: mail auction_db: auction quest_db: quest homunculus_db: homunculus skill_homunculus_db: skill_homunculus mercenary_db: mercenary mercenary_owner_db: mercenary_owner ragsrvinfo_db: ragsrvinfo // Map Database Tables item_db_db: item_db item_db_re_db: item_db_re item_db2_db: item_db2 item_cash_db_db: item_cash_db item_cash_db2_db: item_cash_db2 mob_db_db: mob_db mob_db2_db: mob_db2 mob_skill_db_db: mob_skill_db mob_skill_db2_db: mob_skill_db2 mapreg_db: mapreg // Use SQL item_db, mob_db and mob_skill_db for the map server? (yes/no) use_sql_db: no import: conf/import/inter_conf.txt
4. Прописал русские буквы в char_athena.conf
// 2: Letters/symbols in 'char_name_letters' option are forbidden. All others are possibles. char_name_option: 1 // Set the letters/symbols that you want use with the 'char_name_option' option. // Note: Don't add spaces unless you mean to add 'space' to the list. char_name_letters: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 йцукенгшщзхъфывапролджэячсмитьбюёЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮЁ
5. Заходим и не радуемся, тревожит таже самая ошибка =) p.s Конечно я скомпилировал сервер перед тем, как запускать его.
6. dinput.ini
CodePage =1251
7. clientinfo.xml
<version>30</version> <langtype>14</langtype>