1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

[OSX] HybridGlobalization Implement casing functions (#87919)

Implement GlobalizationNative_ChangeCaseNative , GlobalizationNative_ChangeCaseInvariantNative for OSX
This commit is contained in:
Meri Khamoyan 2023-06-29 12:23:59 +04:00 committed by GitHub
parent c88b3776d0
commit 67b1ede8cb
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 240 additions and 26 deletions

View file

@ -408,4 +408,34 @@ Affected public APIs:
- CompareInfo.GetSortKeyLength
- CompareInfo.GetHashCode
Apple Native API does not have an equivalent, so they throw `PlatformNotSupportedException`.
Apple Native API does not have an equivalent, so they throw `PlatformNotSupportedException`.
## Case change
Affected public APIs:
- TextInfo.ToLower,
- TextInfo.ToUpper
Below function are used from apple native functions:
- [uppercaseString](https://developer.apple.com/documentation/foundation/nsstring/1409855-uppercasestring)
- [lowercaseString](https://developer.apple.com/documentation/foundation/nsstring/1408467-lowercasestring)
- [uppercaseStringWithLocale](https://developer.apple.com/documentation/foundation/nsstring/1413316-uppercasestringwithlocale?language=objc)
- [lowercaseStringWithLocale](https://developer.apple.com/documentation/foundation/nsstring/1417298-lowercasestringwithlocale?language=objc)
Behavioural changes compared to ICU
- Final sigma behavior correction:
ICU-based case change does not respect final-sigma rule, but hybrid does, so "ΒΌΛΟΣ" -> "βόλος", not "βόλοσ".
- Below cases will throw exception because of insufficiently sized destination buffer
- Capitalizing the German letter ß (sharp S) gives SS when using Apple native functions.
- Capitalizing ligatures gives different result on Apple platforms, eg. "\uFB00" (ff) uppercase (FF)
- Capitalizing "\u0149" (ʼn) on Apple platforms returns combination of "\u02BC" (ʼ) and N -> (ʼN)