Skip to content

Commit

Permalink
Force utf-8, even when lightdm refuses to cooperate
Browse files Browse the repository at this point in the history
  • Loading branch information
mixu committed Dec 26, 2013
1 parent 5f16f20 commit e801371
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nwm-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@ if ( process.env.DISPLAY && process.env.DISPLAY == ':1' ) {
baseModifier = Xh.Mod4Mask|Xh.ControlMask; // Win + Ctrl
}

var envWithLang = JSON.parse(JSON.stringify(process.env));

console.log(envWithLang);

envWithLang.LANGUAGE = 'en_US.utf8';
envWithLang.LANG = 'en_US.utf8';
envWithLang.LC_ALL = 'en_US.utf8';


function exec(command, onErr) {
var term = child_process.spawn(command, [], { env: process.env });
var term = child_process.spawn(command, [], { env: envWithLang });

term.stderr.setEncoding('utf8');
term.stderr.on('data', function (data) {
Expand Down

0 comments on commit e801371

Please sign in to comment.