| Ticket UUID: | 959973 | |||
| Title: | wm title bug | |||
| Type: | Bug | Version: | obsolete: 8.4.6 | |
| Submitter: | oskin | Created on: | 2004-05-25 08:53:39 | |
| Subsystem: | 67. Unix Window Operations | Assigned To: | jenglish | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2004-07-06 02:19:49 | |
| Resolution: | Fixed | Closed By: | jenglish | |
| Closed on: | 2004-07-05 19:19:49 | |||
| Description: |
At placed UTF-8 locale are incorrectly displayed non-Latin1 characters in titles of windows (wm title, wm iconname, etc.). | |||
| User Comments: |
jenglish added on 2004-07-06 02:19:49:
Logged In: YES user_id=68433 Tested on a handful of WMs, seems to work OK. Committing. jenglish added on 2004-06-22 23:24:38: File Added - 91530: tk-wm-title.patch Logged In: YES user_id=68433 Attached patch implements the behaviour described. Please test. Re: dkf's comment about XStringListToTextProperty: This appears to be some sort of "convenience" routine, probably added to make it easier to handle COMPOUND_TEXT. AFAICT Tk was only using this because XSetWMName() takes an XTextProperty *; the attached patch uses the older XStoreName() routine instead, which takes a regular old const char *. jenglish added on 2004-06-06 00:59:35: Logged In: YES user_id=68433 According to the ICCCM, the WM_NAME property is of type "STRING or some other ATOM naming the encoding chosen by the owner. [...] STRING [...] specifies the ISO Latin-1 character set." (2.7.1 "TEXT Properties"). It's not clear in this context whether COMPOUND_TEXT is allowed (not that it matters, since COMPOUND_TEXT is a horrible bodge and we probably don't want to implement it anyway :-). No other encodings are mentioned in the ICCCM (or in any other X documentation that I can find). The latest revision of the X Registry that I can find (dated June 2001) does state that "In R6.6 X.Org is reserving the string UTF8_STRING for use as an ICCCM property type and selection target. The ICCCM spec will be updated in a future release to fully specify UTF8_STRING." It is highly unlikely at this point that any future revisions of the ICCCM from X.Org are actually forthcoming; it's probably not safe to assume current or future support for UTF8_STRING in common WMs. The freedesktop.org Window Manager spec, however, specifies: | _NET_WM_NAME, UTF-8_STRING | | The Client SHOULD set this to the title of the window in UTF-8 | encoding. If set, the Window Manager should use this in preference | to WM_NAME. Proposed fix: [wm title] should set both _NET_WM_NAME (in UTF-8) and WM_NAME (converted to iso8859-1, with non-Latin-1 characters replaced with "?" as usual). This will work correctly on modern window managers while providing a reasonable fallback for older WMs. oskin added on 2004-05-26 12:52:27: Logged In: YES user_id=578377 Probably. I not so well know Xlib. I have simply read through manpages and have made so that worked. :) dkf added on 2004-05-25 16:19:21: Logged In: YES user_id=79902 Yuck. I'm not at all convinced that XStringListToTextProperty is the right thing to be using here; I'm pretty convinced it is going to be picking the wrong format (XA_STRING) for our purposes. 8^( oskin added on 2004-05-25 15:53:39: File Added - 88336: tkUnixWm.c.diff | |||
Attachments:
- tk-wm-title.patch [download] added by jenglish on 2004-06-22 23:24:38. [details]
- tkUnixWm.c.diff [download] added by oskin on 2004-05-25 15:53:39. [details]
