View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003321 | The Dark Mod | Coding | public | 18.02.2013 01:19 | 24.03.2024 07:02 |
Reporter | Zbyl | Assigned To | |||
Priority | normal | Severity | normal | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | SVN | ||||
Summary | 0003321: idStr::ToUpper(), idStr::ToLower() etc. don't work properly | ||||
Description | The following idStr methods work improperly for all languages other than english: ToLower() (all three overloads) ToUpper() (all three overloads) CharIsLower() CharIsUpper() CharIsAlpha() Icmp() Icmpn() IcmpNoColor() And possibly: CharIsPrintable() CheckExtension() IcmpPath() IcmpnPath() | ||||
Additional Information | The reasons are as follows: - some of those functions consider only a-zA-Z to be valid letters (i.e. idStr::ToLower(char c)), - some of those functions consider only a-zA-Z and 0xC0-0xFF to be valid letters (i.e. idStr::ToLower(void)), - functions are inconsistent (compare first two points), - all of those functions assume that BigLetter + ('a' - 'A') == SmallLetter, which is not true in TDM custom codepage. Those functions need to be fixed to work properly on TDM codepage defined on the wiki: http://wiki.thedarkmod.com/index.php?title=I18N_-_Charset Additional difficulty is to support russian codepage. Tasks: - fix functions from the first list (will reduce performance somewhat), - decide what to do with functions from the second list, - find a way to hack in support for russian codepage (which is WIN-1251 with 0xFF remapped to 0xB6, I think). Also the mentioned article on the wiki suggests that Doom 3 supported asian languages, which I can't find any confirmation nor trace of. (Doom 3 BFG supports japanese tough.) | ||||
Tags | text | ||||
@Zbyl: Could you update this issue description with a sentence or two of how the error manifests itself? It would also be great if you could add a brief description in steps to reproduce. | |
Letters A-Z are not the only letters that need ToUpper() etc. There are also letters like ąćźżłńóśćäöüñéáíóúçâêîôû etc. Not all of them are correctly handled. Examples for "all of those functions assume that BigLetter + ('a' - 'A') == SmallLetter, which is not true in TDM custom codepage": - Ł and ł - Ś and ś - Ň and ň - Á and å and many, many more. Those functions don't work for those letters (unless the code was fixed since this bug was reported). |
|
Actually Á and á is ok. But Ă and ă is not. Ð and đ is not, etc. | |