11cb0ef41Sopenharmony_ci"use strict"
21cb0ef41Sopenharmony_civar os = require("os")
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_civar hasUnicode = module.exports = function () {
51cb0ef41Sopenharmony_ci  // Recent Win32 platforms (>XP) CAN support unicode in the console but
61cb0ef41Sopenharmony_ci  // don't have to, and in non-english locales often use traditional local
71cb0ef41Sopenharmony_ci  // code pages. There's no way, short of windows system calls or execing
81cb0ef41Sopenharmony_ci  // the chcp command line program to figure this out. As such, we default
91cb0ef41Sopenharmony_ci  // this to false and encourage your users to override it via config if
101cb0ef41Sopenharmony_ci  // appropriate.
111cb0ef41Sopenharmony_ci  if (os.type() == "Windows_NT") { return false }
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci  var isUTF8 = /UTF-?8$/i
141cb0ef41Sopenharmony_ci  var ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG
151cb0ef41Sopenharmony_ci  return isUTF8.test(ctype)
161cb0ef41Sopenharmony_ci}
17