[FriBidi] Mixed RTL and numeric strings
Behdad Esfahbod
behdad at behdad.org
Mon May 13 15:39:03 PDT 2013
Do you have code you can show us? I'm not even sure what you are trying to
do. You should be using a full-fledged text layout system like Pango.
On 13-05-13 05:50 PM, Ian Walberg wrote:
> So using notepad on windows we have been able to insert the LTE code rather than using a hex editor which is much more practical.
>
> However when displaying the labels on mapserver we are still getting boxes (I assume unrecognized characters) displayed.
>
> The question now is do the non-displaying characters need removing from the returned string before rendering?
>
> Thanks
>
> Ian
>
> -----Original Message-----
> From: fribidi-bounces+ian.walberg=airborne.aero at lists.freedesktop.org [mailto:fribidi-bounces+ian.walberg=airborne.aero at lists.freedesktop.org] On Behalf Of Ian Walberg
> Sent: Wednesday, April 17, 2013 3:50 PM
> To: Behdad Esfahbod; Khaled Hosny
> Cc: FriBidi
> Subject: Re: [FriBidi] Mixed RTL and numeric strings
>
> Ok we have rather awkwardly inserted the hex codes for LTE and PDF around the -32 in our arabic text for -32 degrees from google translate.
>
> This now displays the characters as we believe they should be and the minus sign to the left (-32) instead of the right (32-).
>
> We are getting a couple of boxes displayed which I assume are bad characters we have entered when doing the hex edit.
>
> However my question now is how do with do this in a way that normal none hex editing humans can understand?
>
> Thanks
>
> Ian
>
> -----Original Message-----
> From: Ian Walberg
> Sent: Wednesday, April 17, 2013 2:43 PM
> To: 'Behdad Esfahbod'; Khaled Hosny
> Cc: FriBidi
> Subject: RE: [FriBidi] Mixed RTL and numeric strings
>
> Behdad,
>
> Ok good .....
>
> What we have been requested to do is always put the minus sign on the left hand side of the number (12345) digits even when the left is RTL.
>
> We are experimenting with combinations of characters this afternoon but are not sure what might work or if this is even possible. Currently we always see the minus sign on the right hand side when the test is RTL.
>
> Many thanks
>
> Ian
>
> -----Original Message-----
> From: Behdad Esfahbod [mailto:behdad.esfahbod at gmail.com] On Behalf Of Behdad Esfahbod
> Sent: Wednesday, April 17, 2013 2:35 PM
> To: Khaled Hosny
> Cc: Ian Walberg; FriBidi
> Subject: Re: [FriBidi] Mixed RTL and numeric strings
>
> Snap. That's exactly why U+066x digits and U+06Fx digits have different types. So, MINUS SIGN is supposed to work both for Arabic and Persian digits.
>
> b
>
> On 13-04-17 05:31 PM, Khaled Hosny wrote:
>> For RTL text I expect the minus to be on the right (OK, I was taught
>> math in from right to left using Arabic notation), so Unicode/FriBiDi
>> are doing the right thing, so what you want here is to treat math
>> expressions as being “isolated” LTR, so you should enclose them in LRE
>> and PDF marks (U+202A and U+202C, respectively).
>>
>> Regards,
>> Khaled
>>
>> On Wed, Apr 17, 2013 at 05:21:11PM -0400, Ian Walberg wrote:
>>> Behdad,
>>>
>>> Let us try that, we do need to mix number (12345) and Arabic/Hebrew text with the minus sign.
>>>
>>> Thanks
>>>
>>> Ian
>>>
>>> -----Original Message-----
>>> From: Behdad Esfahbod [mailto:behdad.esfahbod at gmail.com] On Behalf Of
>>> Behdad Esfahbod
>>> Sent: Wednesday, April 17, 2013 2:18 PM
>>> To: Ian Walberg
>>> Cc: FriBidi
>>> Subject: Re: [FriBidi] Mixed RTL and numeric strings
>>>
>>> On 13-04-17 05:10 PM, Ian Walberg wrote:
>>>> Behdad,
>>>>
>>>> That seems to give the same result.
>>>>
>>>> Can you send me a utf8 string that you think should work with a minus sign?
>>>
>>> How about this:
>>>
>>> −۳۲ بهداد
>>>
>>> b
>>>
>>>> Thanks
>>>>
>>>> Ian
>>>>
>>>>
>>>> -----Original Message-----
>>>> From:
>>>> fribidi-bounces+ian.walberg=airborne.aero at lists.freedesktop.org
>>>> [mailto:fribidi-bounces+ian.walberg=airborne.aero at lists.freedesktop.
>>>> or
>>>> g] On Behalf Of Ian Walberg
>>>> Sent: Wednesday, April 17, 2013 1:54 PM
>>>> To: Behdad Esfahbod
>>>> Cc: FriBidi
>>>> Subject: Re: [FriBidi] Mixed RTL and numeric strings
>>>>
>>>> Behdad,
>>>>
>>>> Ok great, how do we insert that? Say using a text editor? We use ultra edit.
>>>>
>>>> Thanks
>>>>
>>>> Ian
>>>>
>>>> -----Original Message-----
>>>> From: Behdad Esfahbod [mailto:behdad.esfahbod at gmail.com] On Behalf
>>>> Of Behdad Esfahbod
>>>> Sent: Wednesday, April 17, 2013 1:49 PM
>>>> To: Ian Walberg
>>>> Cc: FriBidi
>>>> Subject: Re: Mixed RTL and numeric strings
>>>>
>>>> I think the easiest way to fix this is to use U+2212 MINUS SIGN instead of ASCII HYPHEN-MINUS.
>>>>
>>>> behdad
>>>>
>>>> On 13-04-16 07:45 PM, Ian Walberg wrote:
>>>>> Behdad,
>>>>>
>>>>>
>>>>>
>>>>> Below is the image from mapserver and the text copied from the
>>>>> sqlite database (attached).
>>>>>
>>>>>
>>>>>
>>>>> Regards
>>>>>
>>>>>
>>>>>
>>>>> Ian
>>>>>
>>>>>
>>>>>
>>>>> -32 درجة حرارة الهواء
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Behdad Esfahbod [mailto:behdad.esfahbod at gmail.com] On Behalf
>>>>> Of Behdad Esfahbod
>>>>> Sent: Tuesday, April 16, 2013 12:49 PM
>>>>> To: Ian Walberg
>>>>> Cc: FriBidi
>>>>> Subject: Re: Mixed RTL and numeric strings
>>>>>
>>>>>
>>>>>
>>>>> On 13-04-16 11:23 AM, Ian Walberg wrote:
>>>>>
>>>>>> Behdad,
>>>>>
>>>>>>
>>>>>
>>>>>> We are using mapserver and need to display mixed RTL text and
>>>>>> numeric
>>>>>
>>>>>> data.
>>>>>
>>>>>>
>>>>>
>>>>>> The numeric data displays the minus sign after the string 123-
>>>>>> rather
>>>>>
>>>>>> than -123 as we would like.
>>>>>
>>>>>>
>>>>>
>>>>>> Is it possible to make the minus sign appear before the numbers?
>>>>>
>>>>>
>>>>>
>>>>> Show me the code?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Many thanks
>>>>>
>>>>>>
>>>>>
>>>>>> Ian
>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> behdad
>>>>>
>>>>> http://behdad.org/
>>>>>
>>>>
>>>> --
>>>> behdad
>>>> http://behdad.org/
>>>> _______________________________________________
>>>> fribidi mailing list
>>>> fribidi at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/fribidi
>>>>
>>>
>>> --
>>> behdad
>>> http://behdad.org/
>>> _______________________________________________
>>> fribidi mailing list
>>> fribidi at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/fribidi
>>
>
> --
> behdad
> http://behdad.org/
> _______________________________________________
> fribidi mailing list
> fribidi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fribidi
>
--
behdad
http://behdad.org/
More information about the fribidi
mailing list