{"action":"created","issue":{"url":"https://api.github.com/repos/Maximus5/ConEmu/issues/945","repository_url":"https://api.github.com/repos/Maximus5/ConEmu","labels_url":"https://api.github.com/repos/Maximus5/ConEmu/issues/945/labels{/name}","comments_url":"https://api.github.com/repos/Maximus5/ConEmu/issues/945/comments","events_url":"https://api.github.com/repos/Maximus5/ConEmu/issues/945/events","html_url":"https://github.com/Maximus5/ConEmu/issues/945","id":188334266,"number":945,"title":"WriteConsoleW used with ConEmu duplicates Chinese characters output","user":{"login":"DoctorNelSon","id":23081266,"avatar_url":"https://avatars.githubusercontent.com/u/23081266?v=3","gravatar_id":"","url":"https://api.github.com/users/DoctorNelSon","html_url":"https://github.com/DoctorNelSon","followers_url":"https://api.github.com/users/DoctorNelSon/followers","following_url":"https://api.github.com/users/DoctorNelSon/following{/other_user}","gists_url":"https://api.github.com/users/DoctorNelSon/gists{/gist_id}","starred_url":"https://api.github.com/users/DoctorNelSon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoctorNelSon/subscriptions","organizations_url":"https://api.github.com/users/DoctorNelSon/orgs","repos_url":"https://api.github.com/users/DoctorNelSon/repos","events_url":"https://api.github.com/users/DoctorNelSon/events{/privacy}","received_events_url":"https://api.github.com/users/DoctorNelSon/received_events","type":"User","site_admin":false},"labels":[{"id":322839271,"url":"https://api.github.com/repos/Maximus5/ConEmu/labels/drawing-cjk","name":"drawing-cjk","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-09T19:39:57Z","updated_at":"2016-11-15T21:17:58Z","closed_at":null,"body":"\r\n### Versions\r\n\r\nConEmu build: 161023 x64 stable\r\nOS version: Windows 10 x64 (1607)\r\nMicrosoft Windows [version 10.0.14959] cmd \r\n\r\n### Problem description\r\nWriteConsoleW duplicates chinese characters\r\n\r\n### Steps to reproduce\r\n\r\n### Actual results\r\nOutput: Traditional Chinese     漢漢字字\r\n\r\n### Expected results\r\nOriginal string: Traditional Chinese     漢字\r\n\r\n### Additional files\r\nbuild this code with VS 2015 C++:\r\n\r\n#include <Windows.h>\r\n#include <string>\r\n\r\nint main()\r\n{\r\n\tstd::wstring msg = L\"Traditional Chinese\t漢字\";\r\n\tHANDLE consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);\r\n\tWriteConsoleW(consoleHandle, msg.c_str(), msg.size(), NULL, NULL);\r\n    return 0;\r\n}\r\n"},"comment":{"url":"https://api.github.com/repos/Maximus5/ConEmu/issues/comments/260771271","html_url":"https://github.com/Maximus5/ConEmu/issues/945#issuecomment-260771271","issue_url":"https://api.github.com/repos/Maximus5/ConEmu/issues/945","id":260771271,"user":{"login":"Maximus5","id":1222388,"avatar_url":"https://avatars.githubusercontent.com/u/1222388?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximus5","html_url":"https://github.com/Maximus5","followers_url":"https://api.github.com/users/Maximus5/followers","following_url":"https://api.github.com/users/Maximus5/following{/other_user}","gists_url":"https://api.github.com/users/Maximus5/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximus5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximus5/subscriptions","organizations_url":"https://api.github.com/users/Maximus5/orgs","repos_url":"https://api.github.com/users/Maximus5/repos","events_url":"https://api.github.com/users/Maximus5/events{/privacy}","received_events_url":"https://api.github.com/users/Maximus5/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T21:17:58Z","updated_at":"2016-11-15T21:17:58Z","body":"Perhaps this comes from changes in attributes processing. I noted some time ago (not sure where exactly) that new Windows build process high byte of console attributes \"in proper and better way\"...\r\nOne of the most weird things in conhost is COMMON_LVB_LEADING_BYTE/COMMON_LVB_TRAILING_BYTE processing. It works differently on DBCS (Chenese/Japanese/...) Windows distros than on \"European\" distros. On DBCS systems, when certain CJK codepages are selected, each double-width glyph takes two (or more?) CHAR_INFOs (cells). That never happened on European distros, even if CJK support was installed and these codepages were selected in the console.\r\nI can't reproduce this issue on my test Win 10 boxes yet."}}
{"actor":{"display_login":"Maximus5"}}