Jump to content
  • 0
Sign in to follow this  
PROrabbit

cyrillic symbols in db

Question

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.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0
19 hours ago, 4144 said:

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?

Edited by PROrabbit

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, 4144 said:

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...

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

Edited by PROrabbit
status update

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.