Browse Source

Hxcpp native format is always utf8, whether or not string length refers the characters or bytes

hughsando 7 years ago
parent
commit
001f0dc33a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/unit/src/unitstd/Unicode.unit.hx

+ 1 - 1
tests/unit/src/unitstd/Unicode.unit.hx

@@ -102,7 +102,7 @@ str.toHex() == "c3a9e38182f09f9882";
 
 
 var rawBytes = haxe.io.Bytes.ofString("éあ😂",RawNative);
 var rawBytes = haxe.io.Bytes.ofString("éあ😂",RawNative);
 
 
-#if !utf16
+#if (!utf16 || cpp)
 rawBytes.toHex() == "c3a9e38182f09f9882"; // UTF-8 native
 rawBytes.toHex() == "c3a9e38182f09f9882"; // UTF-8 native
 #else
 #else
 rawBytes.toHex() == "e90042303dd802de"; // UTF-16 native
 rawBytes.toHex() == "e90042303dd802de"; // UTF-16 native