Bug 131338 - Phone numbers written with Eastern Arabic numerals are garbled
Summary: Phone numbers written with Eastern Arabic numerals are garbled
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-07 18:42 PDT by Myles C. Maxfield
Modified: 2014-04-07 21:34 PDT (History)
7 users (show)

See Also:


Attachments
Patch (12.29 KB, patch)
2014-04-07 18:49 PDT, Myles C. Maxfield
mitz: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2014-04-07 18:42:50 PDT
Phone numbers written with Eastern Arabic numerals are garbled
Comment 1 Myles C. Maxfield 2014-04-07 18:49:06 PDT
Created attachment 228791 [details]
Patch
Comment 2 mitz 2014-04-07 19:18:22 PDT
Comment on attachment 228791 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228791&action=review

> Source/WebCore/ChangeLog:11
> +        If we find some Other Neutral characters between two Eastern Arabic numbers,
> +        we used to label the Other Neutral characters as RTL no matter what. Instead,
> +        we can label them as more arabic numbers so that they don't get re-ordered
> +        or reversed.

It would have been nice to have a reference to the section of the UBA that we are following here.

> Source/WebCore/platform/text/BidiResolver.h:840
>                          // Begin an R run for the neutrals.

This comment (which is sadly a “what” comment rather than a “why” comment) is not longer true. It went from useless to outright misleading!

> LayoutTests/ChangeLog:13
> +        * platform/mac/fast/text/international/bidi-neutral-run-expected.txt: Update expected results

Are all of these changes expected? Did the UBA change or was the implementation in WebKit always wrong?
Comment 3 mitz 2014-04-07 19:23:58 PDT
I don’t undertand why this patch is correct. The expected result doesn’t match what I get at
<http://unicode.org/cldr/utility/bidi.jsp?a=%28٤%D9%A0٨%29+٢١٥-٨١٩٨&p=LTR>. WebKit’s current behavior does match that.