<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1255"
http-equiv="Content-Type">
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
Shachar Shemesh wrote:
<blockquote cite="mid:4A4B509E.1020203@shemesh.biz" type="cite">
<meta content="text/html;charset=windows-1255"
http-equiv="Content-Type">
Yuval Hager wrote:
<blockquote cite="mid:200907011340.07773.yuval@avramzon.net"
type="cite">
<pre wrap="">if I try to run
$ watch "echo ωμεν123"
I just get the '123' on the page, Hebrew characters stripped.
man watch says:
</pre>
<blockquote type="cite">
<pre wrap=""> Non-printing characters are stripped from program output.
Use "cat -v" as part of the command pipeline if you want to see
them.
</pre>
</blockquote>
<pre wrap=""><!---->
but if I try
$ watch "echo ωμεν123|cat -v"
I get something like:
M-WM-)M-WM-^\M-WM-^UM-WM-^]123
Any way to idea Hebrew characters under watch?
</pre>
</blockquote>
This works for iso-8859-8 locale, but not for UTF-8 locale. I think
it's a bug in both watch (for treating these characters as
unprintables) and in cat (for the same reason).<br>
<br>
I do believe they have problems dealing with multi-byte characters. I
have nothing to suggest besides sending a bug report.<br>
<br>
Shachar<br>
</blockquote>
Okay,<br>
<br>
Narrowed it down some more.<br>
<br>
The culprit is the use of "isprint" to figure out whether a character
is printable or not. The problem is that the interface for isprint has
an interface that makes it impossible for it to know whether the
character is printable or not. More details can be seen at
<a class="moz-txt-link-freetext" href="http://mail.nl.linux.org/linux-utf8/2002-02/msg00086.html">http://mail.nl.linux.org/linux-utf8/2002-02/msg00086.html</a><br>
<br>
Shachar<br>
<br>
<pre class="moz-signature" cols="72">--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a class="moz-txt-link-freetext" href="http://www.lingnu.com">http://www.lingnu.com</a>
</pre>
</body>
</html>