d068332b88
Code is from cxx.uclibc.org, modified by catty to implement c++17 features
25 lines
475 B
C++
25 lines
475 B
C++
#include <string>
|
|
#include <iostream>
|
|
#include <locale.h>
|
|
|
|
int main(){
|
|
setlocale(LC_ALL, "en_US.utf8");
|
|
|
|
std::wcout.imbue( std::locale("en_US.utf8") );
|
|
|
|
std::cout << "Starting wchar test" << std::endl;
|
|
std::wcout << "Test of wcout output" << std::endl;
|
|
|
|
std::wstring test;
|
|
test = L"This is a test of wstring";
|
|
std::wcout << test << std::endl;
|
|
|
|
std::wcin >> test;
|
|
std::wcout << test << std::endl;
|
|
std::wcin >> test;
|
|
std::wcout << test << std::endl;
|
|
|
|
|
|
return 0;
|
|
}
|