<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 20, 2014 at 3:22 PM, Vincent Lefevre <span dir="ltr">&lt;<a href="mailto:vincent-mosh@vinc17.net" target="_blank">vincent-mosh@vinc17.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">Well, not just terminfo. There are old programs written without<br>

</div>
knowing anything about the character set. What I mean is that<br>
terminfo could have been updated to take into account UTF-8-based<br>
terminals, but this would have broken these old programs.</blockquote><div><br></div><div>Unfortunately, old programs were already broken by the switch from octet-based ANSI terminal emulators to UTF-8-based ANSI terminal emulators. The switch to UTF-8 was a breaking change to the terminal control language.<br>

</div><div><br></div><div>Compare:<br></div><div><div><br></div><div>LC_ALL=C xterm -e &#39;echo -e &quot;\x9b44mHello... \x9b0;1m\x9b30Cworld!&quot;; sleep 10&#39;</div></div><div><br></div><div><img src="cid:ii_144e00d10fa4a9df" alt="Inline image 1"><br>

</div><div><br></div><div><div>(The &quot;LC_ALL=C&quot; puts xterm in old-fashioned octet-based mode.)</div></div><div><br></div><div>to the same command, run in a UTF-8 terminal emulator:</div><div><br></div><div>LC_ALL=en_US.UTF-8 xterm -e &#39;echo -e &quot;\x9b44mHello... \x9b0;1m\x9b30Cworld!&quot;; sleep 10&#39;</div>

<div><br></div><div><img src="cid:ii_144e00d7093cdf56" alt="Inline image 2"><br></div><div><br></div><div><div>(The &quot;LC_ALL=en_US.UTF-8&quot;, if the system has that locale, puts xterm into UTF-8 mode.)</div></div><div>

<br></div><div>The escape sequence (using C1 CSI) works fine in an &quot;original&quot; xterm, but the switch to UTF-8 breaks this application.</div><div><br></div><div>So I think there is no way around this problem in general.</div>

<div><br></div><div>Of course you are right that Mosh could support the ISO 2022 locking shifts (smacs/rmacs) and help some of these applications, and it looks like if everybody put enough resets into their prompt as you have done, that might be ok.</div>

<div><br></div><div>Best regards,</div><div>Keith</div></div></div></div>