cyrillic symbols in db

PROrabbit

New member
Messages
5
Points
0
I try to get cyrillic symbols to work on my server.

So I edited  name_letters (char-server.conf), <langtype>14</langtype> (clientinfo.xml) and encoded npcs .txt to ANSI.

Chat, char names and npc messages works fine that way.

The problem is when I create characters with cyrillic symbols in their names: it shows in DB in unproper way - like it's using wrong encoding (if I use ut8_general_ci encoding for db).

If I use cp1251_general_ci I get an error (illegal mix of colations cp1251_general_ci IMPLICIT and latin_swedish_ci COERCIBLE) on char creation.

Tried to change default_codepage / codepage in sql_connection.conf - same result.

 
probably you had tables of columns in wrong collation in db. for all objects collation should be same

 
probably you had tables of columns in wrong collation in db. for all objects collation should be same
Thx for your reply.

For cp1251 case:

All tables in db are in cp1251_general_ci: http://prntscr.com/lzl00i

"Name" field of char table is in cp1251_general_ci too: http://prntscr.com/lzl0w5

Error on char creation: http://prntscr.com/lzl1xe

sql-connection.conf: http://prntscr.com/lzl30q (leaving codepage rows commented does not change anything)

For utf8 case (dbs are simmilar to the screenshots above but instead of cp1251_general_ci it has utf8_general_ci all the way) there is no errors if I don't set codepage in .conf (but weird char names in db).

If I set default_codepage / codepage to utf8 in sql_connection.conf (while using utf8 encoded db) it gives me different error: http://prntscr.com/lzxtn6

I have found some old eathena-related posts where people suggest to use some ea src mod to fix this error, but all links are broken. Others thought this might be an phpmyadmin/my.ini problem on Windows OS.

Maybe it's sort of RO client .exe issue?

 
Last edited by a moderator:
in hercules configs two parameters for codepage "codepage" and "default_codepage"

if you want use 1251, probably need set it to both. also default codepage exists in mysql.cfg. try set it to 1251 too

 
in hercules configs two parameters for codepage "codepage" and "default_codepage"

if you want use 1251, probably need set it to both. also default codepage exists in mysql.cfg. try set it to 1251 too
Yes, I tried to set "codepage" and/or "default_codepage" to 1251 (or utf8) getting same results as described above.

There is no mysql.cfg (only my.ini) that has "default-character-set" and "character-set-server" (but doesn't have "default-collation").

As I red from ru eathena topics - in most cases all should work fine with utf8 and there is no need in 1251. But for me any solution doesn't seem to work. Maybe I'll try to get this to work on unix-based OS someday...

 
well for alternative client utf8 works fine. this client internally using utf8 too.

 
So it was a problem with connection collation

Set

init_connect='SET collation_connection = cp1251_general_ci'
init_connect='SET NAMES cp1251'

in my.ini

Works fine now

 
Last edited by a moderator:
Back
Top