PuTTY semi-bug bidi

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Snapshot | Docs | Changes | Wishlist

summary: Bidirectional text support
class: semi-bug: This might or might not be a bug, depending on your precise definition of what a bug is.
difficulty: taxing: Needs external things we don't have (standards, users etc)
priority: medium: This should be fixed one day.
fixed-in: 2004-12-28 414aba9f5aef77049ef1ab375857f0abc7ede508 (0.58)

If you use Unicode mode and attempt to display text in a right-to-left script such as Hebrew or Arabic, PuTTY gets somewhat confused. It has no internal awareness of which text should be displayed right-to-left, so it will feed an Arabic string straight to the Windows text display function and assume that the characters go left to right. Apparently this will in fact not happen - TextOut will reverse the string and show it right-to-left. On the surface this will look like a plausible result, except that if you then move the cursor across the text it will change, revealing that PuTTY's beliefs about what characters Windows displayed where don't match reality.

Proper support for this will need to involve a properly thought out design for how a VT-series terminal should support bidirectional text. For a start this will require research into how existing Unicode-enabled VT-series terminal emulators do it, and how big the software support base for those is.

(Also we'll need to find out exactly what algorithm the Windows text display functions use to lay out their output, so that once we know exactly what we want the window to look like we can be sure it really does look like that. This won't be easy either.)

JTN, 2002-06-07: Some time ago, we came to the conclusion that ECMA-48, in the course of defining VT-series-ish terminals, defines how such terminals should support bi-directional text, while ECMA TR/53 nicely encapsulates all the bidi-specific bits in a (more) understandable format, gives examples, etc. Of course, we don't know whether anyone really implements it this way.

ArabEyes currently has a project to add bidi support and Arabic shaping to PuTTY. As of 2004-05-23, their initial code is in the PuTTY snapshots; however it was not released in the 0.55 or 0.56 bugfix releases due to stability and incompleteness issues. As of the 2004-10-16 snapshot, the known issue with horizontal window expansion should be fixed.

Arabeyes have plans for further changes to improve Arabic support. One thing they're blocking on is combining character support.

SGT, 2004-12-28: There's been a lot of work on this recently, including some serious stability changes, and I think I'm now willing to declare this fixed enough to go into a release.


If you want to comment on this web site, see the Feedback page.
Audit trail for this semi-bug.
(last revision of this bug record was at 2016-12-27 11:40:22 +0000)