mathiasbynens / swapcase

A letter case swapper with full Unicode support, i.e. based on the official Unicode case folding mappings.
https://mths.be/swapcase
MIT License
5 stars 3 forks source link

Lowercase ASCII k and s #1

Open dougmoscrop opened 9 years ago

dougmoscrop commented 9 years ago

Is it intended that the lowercase letters s and k convert to something other than S and K?

See swap-map.json

"k": "\u212A",
"s": "\u017F",

Probably not going to break anything for anyone, but it's still a bit strange.

stuartpb commented 7 years ago

Yeah, this module seems to hinge on a misconception of what case folding does; it's a one-way transformation, where multiple inbound nodes can point to the same outbound node.

It should be using the upper-case transformations for lower-case characters combined with the lower-case transformations for upper-case characters: this is not the same thing as the folded-case transformations.

It's also wrong about using full-folding transformations (which are similar to a compatibility normalization) over simple ones (which are similar to a canonical composition normalization), but noting that is kind of irrelevant when the core concept of this module is so entirely busted.

See http://unicode.org/faq/casemap_charprop.html

stuartpb commented 7 years ago

Why was this issue closed? It's still a problem.

dougmoscrop commented 7 years ago

Because I did some clean up all old/open issues that maintainers show no sign of addressing.