Skip to content

TPA map hash calculation in case of "the Turkish-I Problem" if locale was changed. #37910

@viewizard

Description

@viewizard

We are faced with issue, when CoreCLR calculate TPA hash for map entry with not Turkish and not Azeri locale and call TPA map lookup after locale was changed to Turkish or Azeri:

const SimpleNameToFileNameMapEntry *pTpaEntry = tpaMap->LookupPtr(simpleName.GetUnicode());

The point of issue is "the Turkish-I Problem" (https://docs.microsoft.com/en-us/previous-versions/dotnet/articles/ms973919(v=msdn.10)?redirectedfrom=MSDN#the-motivation-the-turkish-i-problem). After locale changed, towupper() provide another result for i and different hash are calculated in case if file name have iletter.

All works fine (for Linux) if hash function HashiString() replaced by HashString() (case-sensitive, without towupper() call).
Is the any restrictions for HashString() usage here instead of HashiString() in case of Linux with case sensitive filesystems? Or, could we fix this in another way?

CC @alpencolt @jkotas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions