@@ -533,7 +533,7 @@ CF_INLINE _CFEncodingConverter *__CFEncodingConverterFromDefinition(const CFStri
533
533
converter -> toCanonicalUnicode = __CFToCanonicalUnicodeCheapMultiByteWrapper ;
534
534
break ;
535
535
536
- #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
536
+ #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
537
537
case kCFStringEncodingConverterICU :
538
538
converter -> toBytes = (_CFToBytesProc )__CFStringEncodingGetICUName (encoding );
539
539
break ;
@@ -699,7 +699,7 @@ uint32_t CFStringEncodingUnicodeToBytes(uint32_t encoding, uint32_t flags, const
699
699
}
700
700
}
701
701
702
- #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
702
+ #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
703
703
if (kCFStringEncodingConverterICU == converter -> definition -> encodingClass ) return __CFStringEncodingICUToBytes ((const char * )converter -> toBytes , flags , characters , numChars , usedCharLen , bytes , maxByteLen , usedByteLen );
704
704
#endif
705
705
@@ -844,7 +844,7 @@ uint32_t CFStringEncodingBytesToUnicode(uint32_t encoding, uint32_t flags, const
844
844
845
845
if (!converter ) return kCFStringEncodingConverterUnavailable ;
846
846
847
- #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
847
+ #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
848
848
if (kCFStringEncodingConverterICU == converter -> definition -> encodingClass ) return __CFStringEncodingICUToUnicode ((const char * )converter -> toBytes , flags , bytes , numBytes , usedByteLen , characters , maxCharLen , usedCharLen );
849
849
#endif
850
850
@@ -888,7 +888,7 @@ CF_PRIVATE CFIndex CFStringEncodingCharLengthForBytes(uint32_t encoding, uint32_
888
888
const _CFEncodingConverter * converter = __CFGetConverter (encoding );
889
889
890
890
if (converter ) {
891
- #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
891
+ #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
892
892
if (kCFStringEncodingConverterICU == converter -> definition -> encodingClass ) return __CFStringEncodingICUCharLength ((const char * )converter -> toBytes , flags , bytes , numBytes );
893
893
#endif
894
894
@@ -932,7 +932,7 @@ CF_PRIVATE CFIndex CFStringEncodingByteLengthForCharacters(uint32_t encoding, ui
932
932
const _CFEncodingConverter * converter = __CFGetConverter (encoding );
933
933
934
934
if (converter ) {
935
- #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
935
+ #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
936
936
if (kCFStringEncodingConverterICU == converter -> definition -> encodingClass ) return __CFStringEncodingICUByteLength ((const char * )converter -> toBytes , flags , characters , numChars );
937
937
#endif
938
938
@@ -1017,7 +1017,7 @@ CF_PRIVATE const CFStringEncoding *CFStringEncodingListOfAvailableEncodings(void
1017
1017
if (NULL == encodings ) {
1018
1018
CFStringEncoding * list = (CFStringEncoding * )__CFBuiltinEncodings ;
1019
1019
CFIndex numICUConverters = 0 , numPlatformConverters = 0 ;
1020
- #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX
1020
+ #if TARGET_OS_MAC || TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI
1021
1021
CFStringEncoding * icuConverters = __CFStringEncodingCreateICUEncodings (NULL , & numICUConverters );
1022
1022
#else
1023
1023
CFStringEncoding * icuConverters = NULL ;
0 commit comments