bug-libunistring
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-libunistring] Bug in data for mirror characters?


From: Daurnimator
Subject: Re: [bug-libunistring] Bug in data for mirror characters?
Date: Mon, 28 Nov 2016 12:47:52 +1100

On 28 November 2016 at 12:43, Bruno Haible <address@hidden> wrote:
> Hi,
>
> Daurnimator wrote:
>> I've noticed that uc_mirror_char() of many characters is returning the
>> unicode replacement character. This doesn't seem to be correct.
>>
>> e.g 0F3A TIBETAN MARK GUG RTAGS GYON should be mirrored to
>> 0F3B TIBETAN MARK GUG RTAGS GYAS
>>
>> #############################################
>> $ cat main.c
>> #include <stdio.h>
>> #include <unictype.h>
>>
>> int main() {
>>     ucs4_t c = 0xf3a, p;
>>     bool has_mirror = uc_mirror_char(c, &p);
>>     printf("%x %s %x\n", c, has_mirror?"true":"false", p);
>>     return 0;
>> }
>>
>> $ gcc main.c -lunistring && ./a.out
>> f3a true fffd
>> #############################################
>
> Thanks for the report. I've registered this in our bug tracker at
> https://savannah.gnu.org/bugs/index.php?49721
>
> Bruno
>

I'm not sure that bug report is correct?

> The documentation should explain that uc_mirror_char may return true, yet set 
> the character to 0xfffd. This means that the character has the bidi mirror 
> property but that this mirrored glyph does not exist as a Unicode character; 
> thus a rendering engine needs to synthesize it artificially or pick it from 
> an appropriate font.

Using the example in my original post, mirroring 0F3A should return
0F3B. This *is* a defined unicode character.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]