2 ms·
Still breaks on, for example, Turkish i vs İ. It's impossible to do correctly without language information. > (No, Python can't turn 'SS' back into 'ß'. But do
by kccqzy 2y ago
Still breaks on, for example, Turkish i vs İ. It's impossible to do correctly without language information.
> (No, Python can't turn 'SS' back into 'ß'. But doing that requires metadata about language that a string simply doesn't represent.)
Yes that's my point. Because in typical languages strings don't store language metadata, this is impossible to do correctly in general.
- zahlman 2y agoI'm not seeing anything in the Swift documentation about strings carrying language metadata, either, though?
- kccqzy 2y agoThis lowercase function takes a locale argument https://developer.apple.com/documentation/foundation/nsstring/1417298-lowercased https://developer.apple.com/documentation/foundation/nsstrin... It looks like an old NSString method that's available in both Obj-C and Swift. The casefold function is even older than that. https://developer.apple.com/documentation/foundation/nsstring/1413779-folding https://developer.apple.com/documentation/foundation/nsstrin... Its documentation specifically includes a discussion of the Turkish İ/I issue.