You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/features/hybrid-globalization.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,3 +245,65 @@ Using `IgnoreNonSpace` for these two with `HybridGlobalization` off, also return
245
245
```C#
246
246
newCultureInfo("de-DE").CompareInfo.IndexOf("strasse", "stra\u00DFe", 0, CompareOptions.IgnoreNonSpace); // 0 or -1
247
247
```
248
+
249
+
250
+
### OSX
251
+
252
+
For OSX platforms we are using native apis instead of ICU data.
253
+
254
+
**String comparison**
255
+
256
+
Affected public APIs:
257
+
- CompareInfo.Compare,
258
+
- String.Compare,
259
+
- String.Equals.
260
+
261
+
The number of `CompareOptions` and `NSStringCompareOptions` combinations are limited. Originally supported combinations can be found [here for CompareOptions](https://learn.microsoft.com/dotnet/api/system.globalization.compareoptions) and [here for NSStringCompareOptions](https://developer.apple.com/documentation/foundation/nsstringcompareoptions).
262
+
263
+
-`IgnoreSymbols` is not supported because there is no equivalent in native api. Throws `PlatformNotSupportedException`.
264
+
265
+
-`IgnoreKanaType` is not supported because there is no equivalent in native api. Throws `PlatformNotSupportedException`.
266
+
267
+
-`None`:
268
+
269
+
`CompareOptions.None` is mapped to `NSStringCompareOptions.NSLiteralSearch`
270
+
271
+
There are some behaviour changes. Below are examples of such cases.
|`\u3042` あ |`\u30A1` ァ | None | 1 | -1 | hiragana and katakana characters are ordered differently compared to ICU |
276
+
|`\u304D\u3083` きゃ |`\u30AD\u30E3` キャ | None | 1 | -1 | hiragana and katakana characters are ordered differently compared to ICU |
277
+
|`\u304D\u3083` きゃ |`\u30AD\u3083` キゃ | None | 1 | -1 | hiragana and katakana characters are ordered differently compared to ICU |
278
+
|`\u3070\u3073\uFF8C\uFF9E\uFF8D\uFF9E\u307C` ばびブベぼ |`\u30D0\u30D3\u3076\u30D9\uFF8E\uFF9E` バビぶベボ | None | 1 | -1 | hiragana and katakana characters are ordered differently compared to ICU |
279
+
|`\u3060` だ |`\u30C0` ダ | None | 1 | -1 | hiragana and katakana characters are ordered differently compared to ICU |
280
+
|`\u00C0` À |`A\u0300` À | None | 1 | 0 | This is not same character for native api |
281
+
282
+
-`StringSort` :
283
+
284
+
`CompareOptions.StringSort` is mapped to `NSStringCompareOptions.NSLiteralSearch` .ICU's default is to use "StringSort", i.e. nonalphanumeric symbols come before alphanumeric. That is how works also `NSLiteralSearch`.
285
+
286
+
-`IgnoreCase`:
287
+
288
+
`CompareOptions.IgnoreCase` is mapped to `NSStringCompareOptions.NSCaseInsensitiveSearch | NSStringCompareOptions.NSLiteralSearch`
289
+
290
+
There are some behaviour changes. Below are examples of such cases.
0 commit comments