#include <iostream>
#include <locale>
int main()
{
    // using system narrow character encoding
    // (UTF-8 except on Windows)
    std::cout << "3² = 9\n"
              << "√9 = 3\n";
    // using system wide character encoding
    // (UCS4 except on Windows)
    std::wcout.sync_with_stdio(false); // or set the C locale too
    std::wcout.imbue(std::locale(""));
    std::wcout << L"3² = 9\n"
               << L"√9 = 3\n";
}
