OSC / ondemand

Supercomputing. Seamlessly. Open, Interactive HPC Via the Web
https://openondemand.org/
MIT License
283 stars 106 forks source link

Many characters not supported in shell #1369

Open johrstrom opened 3 years ago

johrstrom commented 3 years ago

This is a superset of #1214. 1214 was about 1 key not working on a certain layout, but in investigating that ticket I found that many characters are problematic. In fact, I use emojis in my PS1 and on chrome, the shell app does not work at all because of this.

Here's the stack trace that we're seeing.

Uncaught TypeError: it.next is not a function
    at Function.hterm.TextAttributes.splitWidecharString (hterm_all_1.85.mod.js:16612)
    at hterm.Terminal.print (hterm_all_1.85.mod.js:13907)
    at print (hterm_all_1.85.mod.js:17236)
    at hterm.VT.parseUnknown_ (hterm_all_1.85.mod.js:17257)
    at hterm.VT.interpret (hterm_all_1.85.mod.js:17173)
    at hterm.Terminal.interpret (hterm_all_1.85.mod.js:13472)
    at hterm.Terminal.IO.print.hterm.Terminal.IO.writeUTF16 (hterm_all_1.85.mod.js:16075)
    at OodShell.getMessage (ood_shell.2.js:53)

Again - I'm seeing this in Chrome/Windows where Firefox/Linux continues to work. I'll checkout older versions as I'm quite sure this has worked in Chrome in the past.

┆Issue is synchronized with this Asana task by Unito

Micket commented 3 years ago

I'm also seeing this with only google chrome under linux (chromium, firefox seem to work fine). I saw the new code uses a for loop for iterating over the segments; https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm/js/hterm_text_attributes.js#529 and I tried out those changes, and it seems to work. So, simply updating hterm might do the trick.