View Issue Details

IDProjectCategoryView StatusLast Update
0003321The Dark ModCodingpublic24.03.2024 07:02
ReporterZbyl Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status newResolutionopen 
Product VersionSVN 
Summary0003321: idStr::ToUpper(), idStr::ToLower() etc. don't work properly
DescriptionThe 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 InformationThe 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.)
Tagstext

Activities

Fiver

Fiver

11.02.2024 21:21

reporter   ~0016511

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

Zbyl

24.03.2024 06:59

reporter   ~0016585

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

Zbyl

24.03.2024 07:02

reporter   ~0016586

Actually Á and á is ok. But Ă and ă is not. Ð and đ is not, etc.

Issue History

Date Modified Username Field Change
18.02.2013 01:19 Zbyl New Issue
11.02.2024 21:21 Fiver Note Added: 0016511
11.02.2024 21:22 Fiver Tag Attached: text
24.03.2024 06:59 Zbyl Note Added: 0016585
24.03.2024 07:02 Zbyl Note Added: 0016586