Bug 15328

Summary: LRM/MLR marks not converted between cp1255 and UNICODE
Product: FriBidi Reporter: Artyom <artyomtnk>
Component: bidiAssignee: Behdad Esfahbod <freedesktop>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 0.10.4   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch that fixes this issue

Description Artyom 2008-04-02 12:31:32 UTC
Created attachment 15629 [details] [review]
Patch that fixes this issue

Hello,

I use fribidi library in BiDiTeX project --
support of Hebrew for LaTeX documents, and I found
that when I work with documents in cp1255
LRM/RLM marks are not converted correctly
and the code does not work.

There is a bug in fribidi library, or
more exactly in fribidi_cp1255_to_unicode_c()
and fribidi_unicode_to_cp1255_c() functions.

It does not convert LRM/RLM marks to UNICODE symbols
as required (253, 254 <--> 0x200E,0x200F).

The same happens in reverse direction
(unicode to cp1255)

The easiest way to reproduce the problem is following:
Take text ("a"," ","א","!",RLM," ","b") in utf-8
and run through fribidi you'll see "a !א b" as it should be
Same text encoded with cp1255 run with fribidi -c cp1255
you'll see "a א! b" -- incorrect one.

The patch that fixes this problem is attached,
it was build against version 0.10.9

Artyom
Comment 1 Behdad Esfahbod 2008-04-22 12:51:22 UTC
Thanks.  Committed to fribidi.stable branch and fribidi2.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.