mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-03 14:45:33 +00:00
fix unicode on windows. see #130.
This commit is contained in:
parent
f37a619cc6
commit
a42631cbc7
10
lib/tput.js
10
lib/tput.js
@ -2138,6 +2138,11 @@ Tput.prototype.GetConsoleCP = function() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Allow unicode on all windows consoles for now:
|
||||
if (+process.env.NCURSES_UNICODE !== 0) {
|
||||
return 65001;
|
||||
}
|
||||
|
||||
try {
|
||||
// Produces something like: 'Active code page: 437\n\n'
|
||||
ccp = cp.execFileSync(process.env.WINDIR + '\\system32\\chcp.com', [], {
|
||||
@ -2157,11 +2162,6 @@ Tput.prototype.GetConsoleCP = function() {
|
||||
|
||||
ccp = +ccp[0];
|
||||
|
||||
// Allow unicode on all windows consoles for now:
|
||||
if (+process.env.NCURSES_UNICODE !== 0) {
|
||||
ccp = 65001;
|
||||
}
|
||||
|
||||
return ccp;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user