feat(Unicode): add Unicode 17.0.0 manifest and strict/repair/streaming UTF codecs (S-UNICODE-01, S-UNICODE-02)
This commit is contained in:
1 parent
bfd6246d32
commit
4369fde867
8 files changed
+1634
-1
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#include <Void/Unicode/Utf.hpp>
|
||||
|
||||
#include <string_view>
|
||||
|
||||
int main()
|
||||
{
|
||||
if (Void::Unicode::data_version() != std::string_view{"17.0.0"}) {
|
||||
return 1;
|
||||
}
|
||||
const auto u16 = Void::Unicode::utf8_to_utf16("hi \xF0\x9F\x9A\x80");
|
||||
if (!u16.has_value()) {
|
||||
return 1;
|
||||
}
|
||||
const auto u8 = Void::Unicode::utf16_to_utf8(*u16);
|
||||
return (u8 && *u8 == "hi \xF0\x9F\x9A\x80") ? 0 : 1;
|
||||
}
|
||||
Reference in new issue
Block a user