Kaixo! On Thu, Feb 21, 2002 at 05:36:23PM -0500, Glenn Maynard wrote: > OTOH, the unprinting character problem is important. Would it be > reasonable to escape (\u) characters with wcwidth(c)==0 (in tool output, > ie ls -b), or is there some reasonable use of them in filenames?
There are reasonable use of zwj and zwnj and similar, they are needed for proper writing in some languages. In fact, all the trouble comes from the xterm, not from "ls". I would say that ls should not escape them, only invalid utf-8 and control chars. then, another command line switch should be added to "escape all but printable ascii". more complex options are not to be done in the command line on an xterm, a graphical toolkit is more suited for that. the reason is that with ls/xterm the rendering and the tool handling the filenames are dissociated, so you cannot easily do interesting things, you can however on an "open" or "save" etc dialog box have a way to set the properties of the text box that shows the file name, and have it display as normal, display zero width chars (in a better way than ugly \xxxx notation, like squares with the hexa value or mnemonic, like in yudit editor); or a mode to dis-shape (useful to see the difference between precompsed or not letter, and the ambiguos ones with several composing chars, like it could happen in vietnamese or thai, etc) So, the only interesting change that would be worth doing for the use of utf-8 in filenames will be an extra switch to ls to quote everything but ascii, and ensure it quotes incorrect utf-8 when the locale is in utf-8 mode. for the special viewing modes in graphical toolkits, it is a general purpose feature, usefull for all widgets dealing with text displaying (and for use by power users, but that is also the case of the bizarre filenames we are talking about, the standard use will never be faced with those strange cases, and if it happens some day he will just turn to the man or woman that he usually turns to for similar complexity problems). -- Ki ça vos våye bén, Pablo Saratxaga http://www.srtxg.easynet.be/ PGP Key available, key ID: 0x8F0E4975 -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/