on windows (10) box, why can print 'black flag' (u+2691) character in places not others (cmd.exe in particular)?
update proposed hints in comments (no answers yet): - [from kevin] cmd.exe unicode support dubious (unspecified, write off issue having strange cmd.exe behavior) - [from mark] process should write consoleapi instead of stdout. - [from mr. lister] change font.
i changed font in webstorm. using monospaced
, , displayed flag properly. switched consolas
, lucida sans
, , courier new
, worked in of them. looked @ the list of supported unicode chars lucida console , indeed, u+2691 not on there. webstorm might have fallback mechanism support character.
i ran conemu, , set base font lucida console, , alternative font dejavu sans, downloaded here. had adjust unicode range manually, setting 2013-3000. , voila, black flag showed. although part 1 (kindof) solved, still don't know going on fonts vs graphics , code pages here. think codepage red herring when dealing unicode... please, if has definitive, love proper answer. ;-)
note, have cmd.exe font set lucida console , current code page (utf-8) 65001. have tried other fonts...and chcp 1252. , yes, have read the spolsky post, excellent. think missing kevin said in comment (cmd.exe not have proper unicode support) , mark said bypassing stdout. explains cmd.exe love know more vs vs vs code vs np++...
i can see character fine in chrome:
http://graphemica.com/⚑ http://graphemica.com/%e2%9a%91
i can see fine in 1 of these:
- office (word, outlook)
- webstorm
- visual studio
however, cannot see here (shows box):
- notepad++
- visual studio code
- cmd.exe
if run in node:
console.log('\u2691:', '\u2691'); console.log('flag:', '⚑')
it dumps boxes (which when copy , paste in here fine).
then there other characters like: heavy check mark (u+2714)
http://graphemica.com/%e2%9c%94 http://graphemica.com/✔
which 'show up' in visual studio code (which not show flag) wont show in cmd.exe.
there appear lot of moving parts here: unicode, char codes, code pages, fonts, , lots more.
can me sort out? going on here?
why character display in places , not in other?
is there can show characters in cmd.exe?
ok, appears if @josefz got me closest answer, @josefz if cut , paste answer own, delete mine. ;-)
these answer looking (i still wish there more font fallback , font vs code page relationships):
it appears reason cannot u+2691 font not support it, not code page issue (at least in case).
apparently programs have backup fonts pseudographics.
webstorm not configured (i had no secondary font enabled) internally.
visual studio code did not have setup, when switched deja vu mono, displayed fine.
specifically, allow use black flag in cmd.exe console: 1. download deja vu mono font. 2. unzip , install (select all, right click, choose install) 3. follow these instructions make available in cmd.exe. 4. go preferences of cmd.exe , choose font.
alternatives: 1. use conemu , set pseudographics font deja vu mono. 2. don't forget manually set unicode range include range needed (2691
, in case, set to: pseudographics: 2013-3000
)
hope helps.
Comments
Post a Comment