JavaCS3 / xterm-player

a web based terminal recording player
https://javacs3.github.io/xterm-player/
MIT License
105 stars 9 forks source link

Question: How is unicode handled? #36

Open frippe75 opened 4 years ago

frippe75 commented 4 years ago

Sorry, rather a question than an issue.

Looked at the format of asciinema v2 which looks to be utf8-unicoded. "it's UTF-8 encoded JSON string, with all non-printable Unicode codepoints encoded as \uXXXX"

Looked thru the code to figure out how this is handled and passed to xterm.write that seems to expect utf16. If you could point out where this is dealt with I would really appreciate it!

JavaCS3 commented 4 years ago

@frippe75 I'm sorry I mat not be able to answer your question. You may need to check xterm.js source code to find the answer or ask questions in gitter room. BTW, What kind of scenario you're meeting that makes you need to figure out how unicode is handled?

Just quickly checked xterm.js source code, I think the answer can be found at here.

https://github.com/xtermjs/xterm.js/blob/60419a7cc6edf46852394119401927f45c46a515/src/common/InputHandler.ts#L481-L484