]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/uinvchar.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / common / uinvchar.cpp
index a0fd9dfbb1cd9d3c8fa4aaefbbddd8e351af8d8a..05bcf10df48921a090f13b92d43c451e20a450a4 100644 (file)
@@ -446,6 +446,13 @@ uprv_copyEbcdic(const UDataSwapper *ds,
     return length;
 }
 
+U_CFUNC UBool
+uprv_isEbcdicAtSign(char c) {
+    static const uint8_t ebcdicAtSigns[] = {
+        0x7C, 0x44, 0x66, 0x80, 0xAC, 0xAE, 0xAF, 0xB5, 0xEC, 0xEF, 0x00 };
+    return c != 0 && uprv_strchr((const char *)ebcdicAtSigns, c) != nullptr;
+}
+
 /* compare invariant strings; variant characters compare less than others and unlike each other */
 U_CFUNC int32_t
 uprv_compareInvAscii(const UDataSwapper *ds,
@@ -562,6 +569,11 @@ uprv_compareInvEbcdicAsAscii(const char *s1, const char *s2) {
     }
 }
 
+U_CAPI char U_EXPORT2
+uprv_ebcdicToAscii(char c) {
+    return (char)asciiFromEbcdic[(uint8_t)c];
+}
+
 U_CAPI char U_EXPORT2
 uprv_ebcdicToLowercaseAscii(char c) {
     return (char)lowercaseAsciiFromEbcdic[(uint8_t)c];