Last change
on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
657 bytes
|
Line | |
---|
1 | "use strict"
|
---|
2 | var os = require("os")
|
---|
3 |
|
---|
4 | var hasUnicode = module.exports = function () {
|
---|
5 | // Recent Win32 platforms (>XP) CAN support unicode in the console but
|
---|
6 | // don't have to, and in non-english locales often use traditional local
|
---|
7 | // code pages. There's no way, short of windows system calls or execing
|
---|
8 | // the chcp command line program to figure this out. As such, we default
|
---|
9 | // this to false and encourage your users to override it via config if
|
---|
10 | // appropriate.
|
---|
11 | if (os.type() == "Windows_NT") { return false }
|
---|
12 |
|
---|
13 | var isUTF8 = /UTF-?8$/i
|
---|
14 | var ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG
|
---|
15 | return isUTF8.test(ctype)
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.