Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubt regarding early-return.py example #22

Closed
ju-sh opened this issue Jan 9, 2022 · 4 comments
Closed

Doubt regarding early-return.py example #22

ju-sh opened this issue Jan 9, 2022 · 4 comments

Comments

@ju-sh
Copy link

ju-sh commented Jan 9, 2022

In the early-return.py example, I had thought

then <RLI> ''' ;return

would end up being rendered as

then nruter; '''

where every character from the end of line (there's an implicit <PDI> at end of line, right? Or doesn't this end of line not count as an end of paragraph?) to the <RLI> are displayed one by one.

But I suppose that's not how it works since it gets displayed as

then return; '''

Could someone help me understand this?

@ju-sh
Copy link
Author

ju-sh commented Jan 9, 2022

Found an example here that says:

Memory:  he said "<RLI>I NEED WATER!<PDI>", and expired.
Display: he said "!RETAW DEEN I", and expired.

But does it work differently in the early-return example?

@nickboucher
Copy link
Owner

This is a great point -- the RLI character behaves strangely. The example that you reference comes from the de facto source of truth for a correct Unicode implementation, but that's not the behavior that I observe in practice.

Unicode Bidi implementations differ by application & OS, but rendering "I NEED WATER!" in Chromium-based browsers for me yields something that looks like "!I NEED WATER". For comparison, here's the encoded form for anyone reading to observe in their own browser:

⁧I NEED WATER!⁩

Experimentally, it appears to me that (at least in Chromium-based software) RLI affects neutral characters but not strong characters; or, rather, at least affects neutral and strong characters differently.

It's not immediately clear to me whether this behavior is in the Unicode Bidi spec, or whether this is a bug/undefined behavior in specific Bidi implementations.

@ju-sh
Copy link
Author

ju-sh commented Jan 11, 2022

Thanks. I think in the example from the page for the bidi algorithm, they also use upper case characters as a kind of notation to represent a script written from right to left (or something like that, right?).

And do you know how is bidi pronounced? Is it 'bye-dye' or 'bee-dee'?

@nickboucher
Copy link
Owner

I've heard it pronounced many different ways; I'm not sure that there's a consensus. Although it's a different "Bidirectional" there's a related thread about it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants