blob: edceb703094082f9950e5e6446d947909fa68bed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
"use strict"
var os = require("os")
var child_process = require("child_process")
var hasUnicode = module.exports = function () {
// Supported Win32 platforms (>XP) support unicode in the console, though
// font support isn't fantastic.
if (os.type() == "Windows_NT") { return true }
var isUTF8 = /[.]UTF-8/
if (isUTF8.test(process.env.LC_ALL)
|| process.env.LC_CTYPE == 'UTF-8'
|| isUTF8.test(process.env.LANG)) {
return true
}
return false
}
|