Skip to content

Instantly share code, notes, and snippets.

@WPettersson
Created December 5, 2016 11:48
Show Gist options
  • Save WPettersson/7510f230a1804d6956ee5a7a1a8fe767 to your computer and use it in GitHub Desktop.
Save WPettersson/7510f230a1804d6956ee5a7a1a8fe767 to your computer and use it in GitHub Desktop.
Unicode in C++
$ cat uni.cpp
#include <string>
#include <iostream>
int main(int argc, char** argv) {
std::string s("™");
std::string t("Hello world");
std::cout << t << s << std::endl;
return 0;
}
$ make uni.cpp && ./uni
g++ uni.cpp -o uni
Hello world™
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment