Fix the issue that shell doesn't support Chinese

This commit is contained in:
loganhz 2018-06-07 15:10:32 +08:00
parent 2f9cc109f6
commit d4dba464da
1 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ export default Component.extend(ThrottledResize, {
set(this,'term', term); set(this,'term', term);
term.on('data', function (data) { term.on('data', function (data) {
socket.send(`0${AWS.util.base64.encode(window.unescape(encodeURIComponent(data)))}`); socket.send(`0${btoa(window.unescape(encodeURIComponent(data)))}`);
}); });
term.open(this.$('.shell-body')[0], true); term.open(this.$('.shell-body')[0], true);
@ -114,7 +114,7 @@ export default Component.extend(ThrottledResize, {
case '1': case '1':
case '2': case '2':
case '3': case '3':
term.write(decodeURIComponent(window.escape(AWS.util.base64.decode(data)))); term.write(decodeURIComponent(window.escape(atob(data))));
break; break;
} }
}; };