# Terminal display unicode?

**URL:** https://discourse.openondemand.org/t/terminal-display-unicode/2430
**Category:** Get Help
**Created:** [January 10, 2023, 7:11pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430 "2023-01-10T19:11:28Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)
#### Post date: [January 10, 2023, 7:11pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/1 "2023-01-10T19:11:28Z")

</div>

My cluster prints their logo in the message of the day, but when I use OOD “shell access” there is no motd at all. I found that when I try to print out the logo, `cat` hangs. I also found that the following command:

```auto
LANG=en_US.UTF-8 printf "\u2588\n"

```

prints a solid white block on my gnome terminal, but prints nothing on the OOD terminal.

I assume that there is no unicode support, and I should make a feature request?

---

<div class="post-metadata">

### Author: ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)
#### Post date: [January 10, 2023, 7:25pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/2 "2023-01-10T19:25:10Z")

</div>

I have also found that it can only print 128 asciii characters. Any number over 127 causes the same hanging behavior.

---

<div class="post-metadata">

### Author: ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)
#### Post date: [January 10, 2023, 7:31pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/3 "2023-01-10T19:31:37Z")

</div>

Hey, sorry for the trouble.

You may be describing this issue, which brings up many characters not working currently:

> <https://github.com/OSC/ondemand/issues/1369>
>
> This is a superset of #1214. 1214 was about 1 key not working on a certain layo…ut, 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. 
> 
> \`\`\`text
> 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\](https://app.asana.com/0/1202821104799596/1202823417382931) by \[Unito\](https://www.unito.io)

What browser and OS are you using for the OOD Shell?

---

<div class="post-metadata">

### Author: ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)
#### Post date: [January 10, 2023, 7:44pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/4 "2023-01-10T19:44:15Z")

</div>

You’re right, I get the motd properly when I use firefox. Chrome is where it can’t print the characters. (I’m using debian bullseye)

---

<div class="post-metadata">

### Author: ![ping.luo](https://avatars.discourse-cdn.com/v4/letter/p/b5e925/32.png) [@ping.luo](https://discourse.openondemand.org/u/ping.luo)
#### Post date: [February 1, 2023, 2:40pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/5 "2023-02-01T14:40:09Z")

</div>

We run Open OnDemand 2.0.28 and the `hterm` shipped with OOD is 1.85. We had trouble viewing `htop` in tree view and `hterm` 1.91 fixed the problem. However, we had to download `hterm` 1.91 from OOD 2.1 and manually update `hterm` in our OOD. It would be good to have `hterm` 1.91 bundled with OOD 2.0.

---

<div class="post-metadata">

### Author: ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)
#### Post date: [February 24, 2023, 7:23pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/6 "2023-02-24T19:23:33Z")

</div>

I don’t see any OOD 2.1, and I couldn’t find any `hterm` on my system, but I did find instructions on how to update hterm:

> <https://github.com/OSC/ondemand/blob/bc4313fefcc8dd32e20f38d569ce841139235667/apps/shell/README.md#updating-hterm>

---

<div class="post-metadata">

### Author: ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)
#### Post date: [February 24, 2023, 8:12pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/7 "2023-02-24T20:12:52Z")

</div>

The guide didn’t work for me.

The shell app is a white screen, and this new error has appeared in the developer console:

![image](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/7/776977d47d9c8ddc383b2f5ce9f756473d3eeb47.png)

I cloned the repo like it said, ran the script (without `scl enable` because I’m on Ubuntu), copied the file, and updated the reference.  
I named the new file `/var/www/ood/apps/sys/shell/public/javascripts/hterm_all_1.92.1.mod.js`, which isn’t exactly the format the instructions specify. The existing file was called `/var/www/ood/apps/sys/shell/public/javascripts/hterm_all_1.85.mod.js`

I think the error is thrown at this line:

> <https://github.com/OSC/ondemand/blob/bc4313fefcc8dd32e20f38d569ce841139235667/apps/shell/views/index.hbs#L147>

The old hterm defined lib.init:

```js
lib.init = function(onInit, opt_logFunction) {
  var ary = lib.initCallbacks_;

  var initNext = function() {
    if (ary.length) {
      var rec = ary.shift();
      if (opt_logFunction)
        opt_logFunction('init: ' + rec[0]);
      rec[1](initNext);
    } else {
      onInit();
    }
  };

```

where the new hterm does not.

[hterm\_all\_1.85.mod.js.txt](https://discourse.openondemand.org/uploads/short-url/bzT22WgbQRQp02b7oud8IxRQ14R.txt) (641.3 KB)  
[hterm\_all\_1.92.1.mod.js.txt](https://discourse.openondemand.org/uploads/short-url/qrHJAL1t6EWUXWsRCkneRe4GBYe.txt) (707.9 KB)

---

<div class="post-metadata">

### Author: ![simonleary-umass-edu](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/simonleary-umass-edu/32/1254_2.png) [@simonleary-umass-edu](https://discourse.openondemand.org/u/simonleary-umass-edu)
#### Post date: [February 24, 2023, 8:25pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/8 "2023-02-24T20:25:06Z")

</div>

There is a years-old pull request that fixes this issue, I just downloaded the hterm javascript from there:  
[https://github.com/c3se/ondemand/blob/82558c98593ac10e0312eab7eebb5b7f3301fb4e/apps/shell/public/javascripts/hterm\_all\_1.91.mod.js](https://github.com/c3se/ondemand/blob/82558c98593ac10e0312eab7eebb5b7f3301fb4e/apps/shell/public/javascripts/hterm_all_1.91.mod.js)

---

<div class="post-metadata">

### Author: ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)
#### Post date: [March 3, 2023, 4:36pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/9 "2023-03-03T16:36:30Z")

</div>

I can backport hterm 1.91 to 2.0 given how much traffic this topic has gotten.

---

<div class="post-metadata">

### Author: ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)
#### Post date: [March 27, 2023, 6:42pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/10 "2023-03-27T18:42:45Z")

</div>

I’ve backported hterm 1.91 to 2.0.32 so that you folks don’t need to hack around on the source code.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)
#### Post date: [September 23, 2023, 6:43pm UTC](https://discourse.openondemand.org/t/terminal-display-unicode/2430/11 "2023-09-23T18:43:23Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
