LRE (&#x202A) is ignored

RESOLVED INVALID

Status

()

RESOLVED INVALID
17 years ago
10 years ago

People

(Reporter: jacobs, Assigned: mkaply)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9+)
Gecko/20020412
BuildID:    2002041203

The HTML 4.0.1 spec says that inline
direction can be changed from right-to-left
to right-to-left by bracketing text with
LRE (hex 202A) and PDF (hex 202C).  The
LRE characer is ignored.


Reproducible: Always
Steps to Reproduce:
1.Copy the sample HTML code into a file and
  aim the browser at it.
2.Look for the second line that contains Hebrew text.

Actual Results:  6WERBEH english1 2WERBEH english3 4WERBEH english5

Expected Results:  6WERBEH english5 2WERBEH english3 4WERBEH english1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
<HTML lang="en" dir="ltr">
<HEAD>
<TITLE>Setting the Direction of Embedded Text</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
</HEAD>
<BODY>
<H1>Setting the Direction of Embedded Text</H1>
<P lang="en" dir="ltr">
In the first example, the base text direction is
left to right.  The center of the line is an inline element
that has right to left orientation.  Correctly displayed, the
directionality should be as follows:
</P>
<PRE>english1 4WERBEH english3 2WERBEH english5 6WERBEH</PRE>
<P lang="en" dir="ltr">
English1
&#x202B;
&#x05D0;&#x05EA;2
English3
&#x05D0;&#x05EA;4
&#x202C;
English5
&#x05D0;&#x05EA;6
</P>
<P lang="en" dir="ltr">
In the second example, the base text direction is
right to left.  The center of the line is an inline element
that has left to right orientation.  Correctly displayed,
the directionality should be as follows:
</P>
<PRE>6WERBEH english5 2WERBEH english3 4WERBEH english1</PRE>
<P lang="he" dir="rtl">
English1
&#x202A;
&#x05D0;&#x05EA;2
English3
&#x05D0;&#x05EA;4
&#x202C;
English5
&#x05D0;&#x05EA;6
</P>
<P>
Authors may also use special Unicode characters to achieve
multiple embedded direction changes. To achieve left-to-right
embedding, surround embedded text with the characters
LEFT-TO-RIGHT EMBEDDING ("LRE", hexadecimal 202A) and
POP DIRECTIONAL FORMATTING ("PDF", hexadecimal 202C). To
achieve right-to-left embedding, surround embedded text with
the characters RIGHT-TO-LEFT EMBEDDING ("RTE",
hexadecimal 202B) and PDF.
</P>
</BODY>
</HTML>
The first example comes from the HTML spec and the second is your construction,
right? If you want to create an example that does the reverse of the first
example you should also swap the Hebrew and English, like this:

<P lang="he" dir="rtl">
&#x05D0;&#x05EA;1
&#x202A;
English2
&#x05D0;&#x05EA;3
English4
&#x202C;
&#x05D0;&#x05EA;5
English6
</P>

In your example the left to right-text at the beginning of the paragraph creates
one level of embedding, then the LRE creates another level.

6WERBEH english1 2WERBEH english3 4WERBEH english5
                 ------------------------>           Explicit embedding (LTR)
        ------------------------------------------>  Implicit embedding (LTR)
<--------------------------------------------------  Base direction (RTL)

Marking INVALID
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID

Updated

10 years ago
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.