[SERVER-10390] Logged non-ASCII text displayed on Windows console is mojibake (garbage) Created: 31/Jul/13  Updated: 11/Jul/16  Resolved: 06/Nov/13

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows console


Operating System: Windows
Participants:

 Description   

The writeUtf8ToWindowsConsole() routine is not being called to display UTF-8 text on the Windows console, causing non-ASCII text to display as garbage.

C:\> mongod --dbpath c:\đāŧă
Tue Jul 30 12:23:06.299 [initandlisten] MongoDB starting : pid=1092 port=27017 dbpath=c:\đāŧă 64-bit host=Tad-W7-VBox
Tue Jul 30 12:23:06.397 [initandlisten] _DEBUG build (which is slower)
Tue Jul 30 12:23:06.479 [initandlisten]
Tue Jul 30 12:23:06.522 [initandlisten] ** NOTE: This is a development version (2.5.2-pre-) of MongoDB.
Tue Jul 30 12:23:06.614 [initandlisten] **       Not recommended for production.
Tue Jul 30 12:23:06.698 [initandlisten]
Tue Jul 30 12:23:06.727 [initandlisten] db version v2.5.2-pre-
Tue Jul 30 12:23:06.776 [initandlisten] git version: f6a77ea2f6ae26f8408055f395ccc000db6008a8
Tue Jul 30 12:23:06.850 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Tue Jul 30 12:23:07.006 [initandlisten] allocator: system
Tue Jul 30 12:23:07.049 [initandlisten] options: { dbpath: "c:\đāŧă" }
Tue Jul 30 12:23:07.125 [initandlisten] exception in initAndListen: 10296
*********************************************************************
 ERROR: dbpath (c:\đāŧă) does not exist.
 Create this directory or give existing directory in --dbpath.
 See http://dochub.mongodb.org/core/startingandstoppingmongo
*********************************************************************
, terminating
dbexit: Tue Jul 30 12:23:07.471 [initandlisten] shutdown: going to close listening sockets...
Tue Jul 30 12:23:07.541 [initandlisten] shutdown: going to flush diaglog...
Tue Jul 30 12:23:07.612 [initandlisten] shutdown: going to close sockets...
Tue Jul 30 12:23:07.676 [initandlisten] shutdown: waiting for fs preallocator...
Tue Jul 30 12:23:07.741 [initandlisten] shutdown: lock for final commit...
Tue Jul 30 12:23:07.811 [initandlisten] shutdown: final commit...
Tue Jul 30 12:23:07.862 [initandlisten] shutdown: closing all files...
Tue Jul 30 12:23:07.910 [initandlisten] closeAllFiles() finished
dbexit: really exiting nowTue Jul 30 12:23:07.981 [initandlisten] thread initandlisten stack usage was 31672 bytes,  which is the most so far



 Comments   
Comment by auto [ 06/Nov/13 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-10390 direct console output to WriteConsoleW instead of std::cout under Windows
Branch: master
https://github.com/mongodb/mongo/commit/d7d128468f1f6ecd68eb3ae6f8ddda74082e7706

Generated at Thu Feb 08 03:23:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.