Database Encoding Problem (ISO-8859-1 to EUC-KR)

Recommended Posts

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) )
    while( *in )
        if( put_space )
        {// replace trim characters with a single space
            *out = ' ';
        // copy non trim characters
        while( *in && !strchr(delims,*in) )
            *out = *in;
        // skip trim characters
        while( *in && strchr(delims,*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?

Share this post

Link to post
Share on other sites

1. Your clientinfo.xml config should have next:


2. Now, you need to configure MySQL server (or MariaDB, or whatever you have) 

Options what is interesting for you is next:

default-character-set = utf8mb4

default-character-set = utf8mb4


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 by Anacondaqq

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.