diff options
author | Tad Marshall <tad@10gen.com> | 2012-06-13 05:03:21 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-06-13 13:28:16 -0400 |
commit | 70546ba57409051eeef817304955a411f46b763b (patch) | |
tree | 7c1df360efdc7be6a4e51da52847f76766a5246a /src/mongo/shell/linenoise_utf8.h | |
parent | 163a2d64ee88f7a4efb604f6208578ef117c4bc3 (diff) | |
download | mongo-70546ba57409051eeef817304955a411f46b763b.tar.gz |
SERVER-2939 fix Windows console output
For Windows, when writing to the console, convert text to UTF-16 and
write it to the screen using WriteConsoleW instead of fwrite or _write.
Diffstat (limited to 'src/mongo/shell/linenoise_utf8.h')
-rw-r--r-- | src/mongo/shell/linenoise_utf8.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/shell/linenoise_utf8.h b/src/mongo/shell/linenoise_utf8.h index 19b163f254e..cb418223732 100644 --- a/src/mongo/shell/linenoise_utf8.h +++ b/src/mongo/shell/linenoise_utf8.h @@ -16,6 +16,7 @@ */ #include <boost/smart_ptr/scoped_array.hpp> +#include <string.h> namespace linenoise_utf8 { @@ -108,6 +109,7 @@ int strncmp32( UChar32* first32, UChar32* second32, size_t length ); * @param fileHandle File handle to write to * @param string32 Source UChar32 character array, may not be null terminated * @param sourceLengthInCharacters Number of source characters to convert and write + * @return Number of bytes written, -1 on error */ int write32( int fileHandle, const UChar32* string32, unsigned int sourceLengthInCharacters ); |