Hello friends, in the DOS and NXT versions,
In the Server and Client source codes:
In the Login ID and Player ID sections,
The foreign character "Asian Languages" is CN-KR.
The system does not recognize letters and languages.
I'm looking for a solution to this issue.
[IMG=expandable: 1]
[/IMG]Server source
MyWork_02.cpp verisinde
STATIC_API BOOL IsSpecialCharacter(char str)
{
const char* t = "!#$%&'*+-/=?^_`{|}~@.";
int t_len = (int)strlen(t);
for (int j = 0; j < t_len; j++)
{
if (str == t[j])
return TRUE;
}
return FALSE;
}
STATIC_API BOOL CheckEmailAndPWString(char* tString)
{
if (!tString || tString[0] == '\0')
return FALSE;
int len = (int)strlen(tString);
// --- Yeni Eklendi: UTF-8 -> UTF-16 dönüştürme (Çin karakterlerini kontrol için) ---
int wlen = MultiByteToWideChar(CP_UTF8, 0, tString, len, NULL, 0);
if (wlen <= 0)
return FALSE;
std::wstring wideStr(wlen, L'\0');
MultiByteToWideChar(CP_UTF8, 0, tString, len, &wideStr[0], wlen);
for (wchar_t ch : wideStr)
{
// Latin harfler ve rakamlar (orijinal mantık)
if ((ch >= L'0' && ch <= L'9') || (ch >= L'A' && ch <= L'Z') || (ch >= L'a' && ch <= L'z'))
continue;
// Özel karakterler
if (IsSpecialCharacter((char)ch))
continue;
// --- Yeni Eklendi: Çin karakter aralıkları ---
if ((ch >= 0x4E00 && ch <= 0x9FFF) || // Temel CJK
(ch >= 0x3400 && ch <= 0x4DBF) || // CJK Genişletilmiş A
(ch >= 0xF900 && ch <= 0xFAFF)) // CJK Uyumluluk
continue;
return FALSE; // izin verilmeyen karakter
}
return TRUE;
}
1- If we changed the structure within this type of coding =
Would the game coding allow CN-based Account and ID registration with this intervention by the server?
2- In the traditional DB database setup; we use UTF8 and Unicode when adding tables.
Should UTF-16 */ General_unicode_ci be used for such radical characters and records?
What should be considered when setting the Character Table for countries with mixed alphabets like CN?
In the client player section, the Chinese IMG was added within the DAT, IMG, and G01.
These only ensure that the player in the game sees the game as CN and can write CN characters in the game.
We are analyzing why there is no CN character support in the game's ID and Player Account ID setup.
#define BEGIN_CL(x) void W_##x( MyUser* tUserInfo ) { CL_##x* r = (CL_##x*)&tUserInfo->mBUFFER_FOR_RECV[0];
#define END_CL() }
// Türkçe: E-posta ve şifre özel karakter kontrolü
// 中文: 邮件和密码特殊字符检查
STATIC_API BOOL IsSpecialCharacter(char str)
{
const char* t = "!#$%&'*+-/=?^_`{|}~@.";
int t_len = strlen(t);
for (int j = 0; j < t_len; j++)
{
if (str == t[j])
return TRUE;
}
return FALSE;
}
// Türkçe: E-posta ve şifre formatı kontrolü (TR, EN, CN destekli)
// 中文: 邮箱和密码格式检查 (支持 TR、EN、CN)
STATIC_API BOOL CheckEmailAndPWString(char* tString)
{
if (!tString || tString[0] == '\0')
return FALSE;
int len = (int)strlen(tString);
for (int index01 = 0; index01 < len; index01++)
{
unsigned char tUnicode = (unsigned char)tString[index01];
// 0-9
if ((tUnicode >= '0') && (tUnicode <= '9'))
continue;
// A-Z
if ((tUnicode >= 'A') && (tUnicode <= 'Z'))
continue;
// a-z
if ((tUnicode >= 'a') && (tUnicode <= 'z'))
continue;
// TR karakterleri (UTF-8 üstü)
// Çince karakterler dahil (>=0x80)
if (tUnicode >= 0x80)
continue;
// Özel karakter kontrolü
if (IsSpecialCharacter((char)tUnicode))
continue;
return FALSE; // Geçersiz karakter bulundu
}
return TRUE;
}
With this kind of coding, will the character problem be solved? Any guesses, guys?






