Hi Alan, On Tue, Apr 29, 2008 at 11:34:10AM +0100, Alan Cox wrote:No I'm not using anything deliberately misconfigured. I'm trying to explain that on the opposite, any tool which has not been explicitly adapted to those new usages is impacted. Please, I'm not "deliberately" setting my tools *not* to support unicode. I have tools which have worked for years and which are now asked to behave strangely. OK I could reproduce the case without ever involving either a shell or readline or anything. Using "cat" as the init program exhibited the anomaly, though it was not much easy to analyze. Then I switched to "init=od -An -tx1 -". 1) if I enter "A" then press backspace, I get nothing. Pressing enter 16 times flushes the line buffer and "od" prints 16 times "0a", indicating nothing was remaining in the buffer. 2) if I enter Ctrl-V Ctrl-A, my display prints "^A", and when I press backspace, I correctly get the cursor back two chars. Once again, flushing the buffer with enter shows it was empty. 3) if I enter Alt-196, I get a "Ä". Flushing the buffer shows that od got two bytes: c3 84. 4) now if I enter Alt-196 and press backspace, my "Ä" is removed by the backspace, but only the second byte is flushed from the line buffer. Then, if I press enter 15 times, I get a line with c3 0a 0a 0a ... And there is no user-land involved here. I'm really hoping you better understand the problem now. Pressing backspace to fix input does not correct the input with multi-byte chars, it leaves incomplete start sequences. If I press Alt-1111111, then backspace, I get f4 8f 91 0a 0a 0a 0a because it is f4 8f 91 87 minus one byte. Of course, pressing Backspace multiple times removes them all, but it also removes previous characters on the display. Another experience : I press 01234, then Alt-255, Backspace, then 56789. On the display, I have 0123456789. od gets 30 31 32 33 34 c3 35 36 37 38 39. Now if I want to correctly fix the input, I have to press backspace twice, but then I have to make the '4' disappear from my display, while knowing it still remains in the buffer. And indeed, my display shows "012356789" but od sees 30 31 32 33 34 35 36 37 38 39. And this is without anything on the user-land (except 'od'), just plain stupid text console booted with "init=..." So obviously there is something broken as the data fed into stdin does not match what is displayed for multi-byte characters. Hoping this clarifies the situation, Willy --
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Re: init's children list is long and slows reaping children. |
| Kohei KaiGai | [PATCH 0/3] exporting capability name/code pairs (final#2) |
git: | |
| Gerrit Renker | [PATCH 33/37] dccp: Initialisation framework for feature negotiation |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Mark Ryden | Re: Linux Wireless Mini-Summit -- Ottawa -- July 22, 2008 |
