Skip to content

Instantly share code, notes, and snippets.

@tshev
Created August 15, 2019 18:40
Show Gist options
  • Save tshev/00df7e726e506ef3e654bbbe87722aaf to your computer and use it in GitHub Desktop.
Save tshev/00df7e726e506ef3e654bbbe87722aaf to your computer and use it in GitHub Desktop.
// g++ u8.cpp -O3 -licuuc -licuio && ./a.out
#include <string>
#include <unicode/unistr.h>
#include <unicode/ustream.h>
#include <unicode/locid.h>
int main() {
std::string source = "Привет";
icu::UnicodeString a(source.data(), "utf-8");
std::cout << a.toLower() << std::endl;
std::cout << a << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment