Bug 183029
Summary: | watch(1) doesn't know and ignores unicode characters | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Radek Bíba <rbiba> | ||||||
Component: | procps | Assignee: | Tomas Smetana <tsmetana> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | mitr | ||||||
Target Milestone: | --- | Keywords: | FutureFeature | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Enhancement | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2007-05-23 08:14:36 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Radek Bíba
2006-02-25 16:39:24 UTC
Created attachment 144544 [details]
Unicode support for watch
This patch fixes the problem. It's a little bit hacky, though. I wanted to
replace the call to getc with getwc, but the program always ended with
segmentation fault when ran, so I wrote readwc function which reads a
multi-byte character from the given stream. The problem is that it works only
with 7-bit ASCII and UTF-8 (is that really a problem?). If anyone knows how to
make getwc work, please do so.
Created attachment 145709 [details]
A more general version
This patch:
* rewrites readwc to respect LC_CTYPE.
(getwc() can't be used because the stream returned by popen() is
byte-oriented).
* adds minimal support for multi-column characters - although it still doesn't
seem to work quite right, see (LC_ALL=fa_IR.UTF-8 ./watch -d -n 1 date)
|