Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84799 > unrolled thread

Re: unicode question

Started byMichael Torrie <torriem@gmail.com>
First post2015-01-28 20:01 -0700
Last post2015-01-28 20:01 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: unicode question Michael Torrie <torriem@gmail.com> - 2015-01-28 20:01 -0700

#84799 — Re: unicode question

FromMichael Torrie <torriem@gmail.com>
Date2015-01-28 20:01 -0700
SubjectRe: unicode question
Message-ID<mailman.18250.1422500483.18130.python-list@python.org>
On 01/28/2015 03:17 PM, Albert-Jan Roskam wrote:
>> I do not know how complete the support is, but this is copied from 3.4.2, which uses tcl/tk 8.6.
>>>> t = "الحركات"
>>>> for c in t: print(c)  # Prints rightmost char above first
>> ا
>> ل
>> ح
>> ر
>> ك
>> ا
>> ت
> 
> Wow, I never knew this was so clever. Is that with or without an RTL marker?

I don't think this has anything to do with Python. Python is simply
spitting out unicode characters as it sees them, starting at string
position 0 and working to the end.  The magic is done by whatever is
displaying the utf-8 output from Python.  If I copy this text to the
clipboard,

t = "hi there, الحركات!"

and paste it in my terminal (say to Python's shell), which is not BIDI
aware, I get the Arabic letters in reverse order. I tried to paste it
here but no matter what I do thunderbird goes into BIDI mode and makes
them appear right.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web