Page MenuHomePhabricator

Position of quotation marks altered when language direction is changed
Closed, InvalidPublic

Description

Steps to reproduce:

  1. Open VE
  2. Type this : Sherlock quoted "I got the clues"
  3. Select the text
  4. Click on Style Text button and select Language from the drop down menu.
  5. Change the direction of text and set it right to left. (By default it is set left to right)

The position of the ending quotation mark gets shifted to beginning and the text appears as:
"Sherlock quoted "I got the clues

Is this expected?

Environment: Beta
OS: Windows
Browser: Google Chrome

Event Timeline

Schnark subscribed.

It looks strange, but when you save the page, it looks the same way, at least in my test, and the weird display is correct according to the Unicode Bidi Algorithm (it's a bit of "garbage in, garbage out", English text isn't written right-to-left, so you can't expect anything sane when forcing this direction on it).
I'm not yet closing this task, as IMHO there might be edge cases, where the display in VE and in the saved page differs (because VE uses unicode-bidi: isolate, which isn't present in the saved page). So, if there are cases in which the content while editing is jumbled differently from the actual result, please provide an exact example.

Jdforrester-WMF subscribed.

Yes, this is intentional; the Unicode BiDi algorithm results in "surprising" outcomes sometimes.