Use UTF-8 in windows console
This commit is contained in:
parent
a2d9504a09
commit
ce08a0c650
2
main.cpp
2
main.cpp
@ -255,7 +255,7 @@ int main
|
|||||||
( int argc, char_t **argv ) {
|
( int argc, char_t **argv ) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// set console to unicode
|
// set console to unicode
|
||||||
_setmode( _fileno( stdout ), _O_U16TEXT );
|
_setmode( _fileno( stdout ), _O_U8TEXT );
|
||||||
#else
|
#else
|
||||||
if ( setlocale( LC_ALL, "" ) == NULL )
|
if ( setlocale( LC_ALL, "" ) == NULL )
|
||||||
error( 1, errno, "%s", _( INVALID_LOCALE ).c_str() );
|
error( 1, errno, "%s", _( INVALID_LOCALE ).c_str() );
|
||||||
|
Loading…
Reference in New Issue
Block a user