|
|
Subscribe / Log in / New account

Perl 5.28.0 released

Perl 5.28.0 released

Posted Jul 16, 2018 7:43 UTC (Mon) by epa (subscriber, #39769)
In reply to: Perl 5.28.0 released by karkhaz
Parent article: Perl 5.28.0 released

Don't you also have to reverse the string?


to post comments

Perl 5.28.0 released

Posted Jul 16, 2018 18:58 UTC (Mon) by dtlin (subscriber, #36537) [Link] (3 responses)

Nope. http://unicode.org/reports/tr9/ opens with exactly this case.

However, there are several scripts (such as Arabic or Hebrew) where the natural ordering of horizontal text in display is from right to left. If all of the text has a uniform horizontal direction, then the ordering of the display text is unambiguous.

However, because these right-to-left scripts use digits that are written from left to right, the text is actually bidirectional: a mixture of right-to-left and left-to-right text.

Arabic letters have Bidi_Class=AL (Arabic letter, strongly RTL), while Arabic digits have Bidi_Class=AN (Arabic number, weakly LTR).

Perl 5.28.0 released

Posted Jul 16, 2018 20:31 UTC (Mon) by zlynx (guest, #2285) [Link] (2 responses)

Claiming that Arabic numerals are RTL is funny because Western Latin languages copied Arabic numerals from Arabic including the direction which is LTR.

Arabic numerals are /supposed to be/ read right to left in little-endian order. Notice that when reading a number, we have to first count all of the digits to determine hundreds, thousands, millions, etc, before we start talking. Instead all these years we could have been reading them as "1 and 20 and 400" if only we'd written them the other direction.

We also have all of the strange formatting exceptions for numbers so that they align to the right. Note that in English that's the only thing we right-align. A big hint that we write them in the wrong order.

Perl 5.28.0 released

Posted Jul 16, 2018 20:46 UTC (Mon) by karkhaz (subscriber, #99844) [Link] (1 responses)

> Claiming that Arabic numerals are RTL is funny because Western Latin languages copied Arabic numerals

I don't think dtlin claimed that at all, their comment was that Arabic digits have a LTR class. However, there's a subtle point here: what we call "Arabic numerals" (0123456789) were indeed copied from Arabic, but I was talking about the numerals that are currently used in most Arab-speaking countries (٠١٢٣٤٥٦٧٨٩, which I referred to as East Arabic numerals to disambiguate).

> Arabic numerals are /supposed to be/ read right to left in little-endian order

I'm not sure what your source for this is. I suppose it makes sense when you have a number embedded in some RTL text. However, I speak Arabic (though I cannot read nor write), and numbers are not pronounced as "1 and 20 and 400". The order is actually a bit jumbled: that particular number is pronounced "four hundred and one and twenty".

In general, higher-magnitude digits are uttered before lower-magnitude ones in spoken Arabic, just as in English. The exceptions are that units are uttered before tens ("one and twenty"), and that the numbers from eleven to twenty have special names (as they do in English, i.e. we say "eleven" as opposed to "one and ten")

Perl 5.28.0 released

Posted Jul 16, 2018 21:02 UTC (Mon) by zlynx (guest, #2285) [Link]

Ah. I must have been confused by the "1 and 20" bit. I'd been told that somewhere and I thought it generalized to higher multiples of ten.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds