Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with displaying item name as ??? when the game language is not english #73

Open
UnclWish opened this issue Jul 22, 2020 · 3 comments

Comments

@UnclWish
Copy link

In pull requests this issue described with screenshots.
In any not english game language mod make item names as "???"
And colors instead of color itself start to show as "y4c" before item name.
It causes by different code pages when game is not english.
All colors must be set like this to work properly:

#define COLOR_REPLACEMENTS
{"WHITE", "\377c0"},
{"RED", "\377c1"},
{"GREEN", "\377c2"},
{"BLUE", "\377c3"},
{"GOLD", "\377c4"},
{"GRAY", "\377c5"},
{"BLACK", "\377c6"},
{"TAN", "\377c7"},
{"ORANGE", "\377c8"},
{"YELLOW", "\377c9"},
{"PURPLE", "\377c;"},
{"DARK_GREEN", "\377c:"}

On Item.cpp must be added next to right colors on any language:
for (DWORD i = 0; i < wcslen(name); i++)
{
if ((name[i] >= 0xFF || name[i] == 0x79) && name[i + 1] == L'c')
{
name[i] = L'\377';
};
}
To fix "???" in item names in Constants.h for russian:

#define CODE_PAGE 1251

I think it must be the way to set CODE_PAGE as system code page...

@AcTiViSioN911
Copy link

Hello, could you please share your Item.cpp? I don't quite understand the line "On Item.cpp must be added next to right colors on any language".

@UnclWish
Copy link
Author

Item.zip
288 string

@wyntau
Copy link

wyntau commented Nov 26, 2021

Same problem, can any one please to resolve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants