[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode confusables and reordering characters considered harmful, a

From: Gregory Heytings
Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution
Date: Thu, 04 Nov 2021 14:10:01 +0000

Since when is it OK to flag characters that are used very rarely? What would be the sense of doing that? Should we perhaps flag all the Egyptian hieroglyphs for the same reason?

The answer is above: "given that these controls can have a dangerous effect".

But they don't. Not more than just using RTL characters within LTR text would. Just revisit the example posted by Stefan (which I slightly modified to be more realistic):

     myfun("שָׁלוֹם" ,"السّلامعليكم");

Which string does this function call pass as the first argument, and which as the second one?

There is no danger in that example, and in particular nothing invisible. The programmer must just be aware that compilers read source code files in byte order, which might be different from the order in which the string is displayed on screen, but is identical to the order in which one forward-char's through the string.

There is a danger when, because the source code contains invisible control characters, the programmer sees something on their screen, and the compiler sees something completely different.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]