[Techtalk] character directionality hack

Wim De Smet kromagg at gmail.com
Wed Jan 17 23:29:06 UTC 2007


On 1/17/07, Rachel McConnell <rachel at xtreme.com> wrote:
> Hi Experts,
>
> I've just seen a really interesting small hack that I don't understand
> yet, and am hoping someone here can explain, or point me at references.
>
> On one page of our site, there is some text that is displayed
> right-to-left instead of left-to-right (the site is nearly all in
> English with no charset specified).  It appears to have been done by
> some nonstandard characters that a user put in their login name.  I have
> put a tiny example showing only the affected section here:
>
> http://www.crazedweasels.com/reverseDirection.html
>
> This server specifies a charset, though, so you can't see the behavior
> from that link, but if you download it and look at it as a file (at
> least in Firefox), you should see the odd behaviour.
>
> Has anyone seen this before?  I haven't even worked out a good way, yet,
> to figure out what the characters in the author's login name ARE.  I
> know there is a great deal of information on Unicode and charsets and
> directionality, and I'll dive into that soon enough, but I'd love any
> pointers on this specific thing!

Well I'm not an expert on unicode either but basically there is a
bunch of control characters, such as a LTR and a RTL character that it
specifies. It allows you to change direction mid-sentence and crazy
stuff like that. I've seen other stuff break because of it too. So you
were definitely on the right track there. :)

greets,
Wim


More information about the Techtalk mailing list