bugThe FreeType Project - Bugs: bug #50858, there is a stray non-ascii char in...

 
 

bug #50858: there is a stray non-ascii char in freetype.h

Submitted by:  None
Submitted on:  Sun 23 Apr 2017 11:03:28 AM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.8

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 07 Dec 2017 03:57:51 PM UTC, comment #5:

OK, convincing (even if I don't like it).

Fixed in git.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 07 Dec 2017 03:12:24 PM UTC, comment #4:

I'm the original submitter, and I have some new comments.

I think only headers should be ASCII-only because headers will be included by other programs, which may use some different character set, and non-ASCII chars may cause problems when compiling.

The non-ASCII chars in source files in freetype itself doesn't matter because we can compile freetype with UTF-8 charset and it doesn't affect other programs.

Zhang Boyang <zby>
Mon 24 Apr 2017 05:31:54 PM UTC, comment #3:

Mhmm, files with non-ASCII characters should be somehow tagged as being UTF-8 – perhaps using the Emacs convention?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 24 Apr 2017 02:42:17 PM UTC, comment #2:

Don't even start:

grep -r -P -n '[^\x00-\x7F]' include/ devel/ src/

Bézier is our favorite. In autofit module we routinely comment almost entire unicode range. Besides that we have only these:

include/freetype/ftwinfnt.h:81: * From Michael Pöttgen <michael@poettgen.de>:
include/freetype/freetype.h:3126: /* results in 50% brightness – 128 ends up too dark on both bright */
src/sfnt/ttload.c:463: /* ignore duplicate tables – the first one wins */
src/truetype/ttobjs.c:1053: /* clean up immediately – bugs in the `fpgm' are so fundamental that */

Alexei Podtelezhnikov <podtelez>
Project Member
Sun 23 Apr 2017 11:58:38 AM UTC, comment #1:

Fixed in git, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sun 23 Apr 2017 11:03:28 AM UTC, original submission:

There is a non-ascii char in freetype.h at line 3153:

/* results in 50% brightness – 128 ends up too dark on both bright */
^ this 'dash' is non-ascii

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/freetype.h#n3153

This char may cause VC++ throw a warning:
warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss

It might also make GCC refuse to compile when -finput-charset is set to cp936 (or some other codepages):
failure to convert cp936 to UTF-8

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by zby (Posted a comment)
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by wl (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 23 Apr 2017 11:58:38 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.8

    Back to the top


    Powered by Savane 3.1-cleanup1