slashdiablo-maphack icon indicating copy to clipboard operation
slashdiablo-maphack copied to clipboard

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

Open UnclWish opened this issue 4 years ago • 3 comments

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

UnclWish avatar Jul 22 '20 16:07 UnclWish

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

AcTiViSioN911 avatar Feb 25 '21 07:02 AcTiViSioN911

Item.zip 288 string

UnclWish avatar Feb 25 '21 14:02 UnclWish

Same problem, can any one please to resolve?

wyntau avatar Nov 26 '21 01:11 wyntau