Menu

#248 Unicode compatibility bugs

djvulibre
closed
nobody
None
5
2015-02-20
2014-11-16
textsharik
No

Multiple Unicode compatibility bugs (crashes, incorrect URLs, etc. when using non-English locale different from default one. For example, Greek symbol on Cyrillic Windows.)

The bugs are related to functions like isalpha(), isdigit(), isalnum(), etc.
The following code contains bug:
char c; if( isalpha(c) ) {...}
The correct code should be:
if( isalpha( (int)(unsigned char)c ) {...}

Related

Bugs: #248

Discussion

  • Leon Bottou

    Leon Bottou - 2014-11-16

    I certainly know that we inherited a flaky unicode managemenr. However, the
    truth is that I do not have the time to fix this. Therefore I would be
    grateful if you suggested specific code changes or detailled specific bugs.

    • L.

    On Sunday, November 16, 2014 10:50:47 AM textsharik wrote:


    ** [bugs:#248] Unicode compatibility bugs**

    Status: open
    Group: djvulibre
    Created: Sun Nov 16, 2014 10:50 AM UTC by textsharik
    Last Updated: Sun Nov 16, 2014 10:50 AM UTC
    Owner: nobody

    Multiple Unicode compatibility bugs (crashes, incorrect URLs, etc. when
    using non-English locale different from default one. For example, Greek
    symbol on Cyrillic Windows.)

    The bugs are related to functions like isalpha(), isdigit(), isalnum(), etc.
    The following code contains bug:
    char c; if( isalpha(c) ) {...}
    The correct code should be:
    if( isalpha( (int)(unsigned char)c ) {...}

     

    Related

    Bugs: #248

  • Leon Bottou

    Leon Bottou - 2015-02-20

    Added lots of (unsigned char) casts to protect ctype macros.
    In the absence of specific tests, I cannot be certain it is complete.

     
  • Leon Bottou

    Leon Bottou - 2015-02-20
    • status: open --> closed
     

Log in to post a comment.

Monday.com Logo