diff options
author | Neil Moore <neil@s-z.org> | 2014-08-04 20:16:43 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-08-04 20:29:47 -0400 |
commit | e5829e7d230fe6ab8f48dbdf49e6fe98e282b2ed (patch) | |
tree | 6e74429a48433b43c423cb9aaf11d4d9a243410c | |
parent | dc37dbaf8c18f201405262730c6639b775183125 (diff) | |
download | crawl-ref-e5829e7d230fe6ab8f48dbdf49e6fe98e282b2ed.tar.gz crawl-ref-e5829e7d230fe6ab8f48dbdf49e6fe98e282b2ed.zip |
Don't try to enable UTF-8 stdin/stderr on Windows (#8773)
On versions of Windows from Vista to 8.1, setting this mode appears to
have prevented any console output (in some cases, regardless of font).
Possible mojibake is better than no output at all, so disable this.
There is more detailed information at
http://alfps.wordpress.com/2011/11/22/unicode-part-1-windows-console-io-approaches/
Possibly if we restricted our stream output to wcout, turning on UTF-8
mode would work in some versions of Windows.
This reverts commit d4add257e66062227038469b1f5f7076b24df8e7.
This reverts commit 6c35d263d0cbdd25cb337822d3f92db0783e1ebc.
-rw-r--r-- | crawl-ref/source/main.cc | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 2a9239dbf6..e33f8ce6cf 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -261,20 +261,6 @@ int main(int argc, char *argv[]) setlocale(LC_ALL, ""); # endif #endif -#ifdef TARGET_OS_WINDOWS - // No documentation about resetting this, nor about which versions of - // Windows is required. Previous ones can't handle writing to the console - // outside ancient locales AT ALL via standard means. - // Even with _O_U8TEXT, output tends to fail unless the user manually - // switches the terminal to a truetype font. And even that fails for - // anything not directly in the font, above U+FFFF, or within Arabic or - // any complex scripts. -# ifndef _O_U8TEXT -# define _O_U8TEXT 0x40000 -# endif - _setmode(_fileno(stdout), _O_U8TEXT); - _setmode(_fileno(stderr), _O_U8TEXT); -#endif #ifdef USE_TILE_WEB if (strcasecmp(nl_langinfo(CODESET), "UTF-8")) { |