bugFree UCS Outline Fonts - Bugs: bug #38642, non-ascii character cause build...

 
 

bug #38642: non-ascii character cause build failure

Submitter:  None
Submitted:  Mon 01 Apr 2013 11:14:29 AM UTC
   
 
Category:  compilation Severity:  3 - Normal
Item Group:  installation Status:  Fix posted
Privacy:  Public Assigned to:  Stevan_White
Originator Email:  -email is unavailable- Open/Closed:  Open
Release:  * development
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 14 Apr 2013 11:20:47 AM UTC, comment #7: 

Hi,

Could I get confirmation that recent commits solved the problem?

Thanks!

Steve White <Stevan_White>
Group administrator
Tue 09 Apr 2013 10:22:06 AM UTC, comment #6: 

Hi (is this Emmanuel?)

I thought of forcing the source to be UTF-8 (search the discussion for "partial fix").

Your fix works if the user's locale is UTF-8.
But, what if the user's encoding is not UTF-8?  Say it's BIG5 or some such.

I wasn't aware of the new SVN "fixed width keyword syntax".
It's a cludge, because it isn't stated explicitly that the first part of the Date is like

    2012-04-24 13:09:08 +0200

This might work on all systems, whereas I think the locale setting is bound to fail on some.  I'll give it a shot.

This problem must come up in all systems.
But I don't understand why I'm not seeing the question everywhere.
I tried searching for "svn date keyword format", and such, but I'm really not seeeing it.

I did find that the $ID:$ keyword uses UTC dates, as opposed to the localized dates used by $Date:$.  If only they had supplied a keyword like "UTCDate"

Here, I want to separate _date_ and _version_, which are, I think, standard for Python.  the "ID" keyword doesn't really work for either...

Thanks!

Steve White <Stevan_White>
Group administrator
Tue 09 Apr 2013 02:47:02 AM UTC, comment #5: 

Hi,

 Probably any hook script in svn will add date under our own locale settings.
 Then, I've noticed specifying UTF-8 is enough to solve it.


(file #27821)

Anonymous
Tue 09 Apr 2013 12:59:14 AM UTC, comment #4: 

I tried (under Windows) to influence the language of the localized date string by setting LC_MESSAGES, LC_ALL, LC_TIME, … This works for changing the messages printed in the console, but don’t affect the date formatting when doing a checkout.

While searching a solution, I came up with a workaround: use fixed-length keyword substitution. That is, something like
$Date::               $, which will truncate the date to fill only the available space (and have the effect of truncating localized and potentially non-ASCII string at the end).
More info on this feature of SVN here, at the end of the page.

Emmanuel Vallois <emmanuel_vallois>
Sat 06 Apr 2013 08:47:53 AM UTC, comment #3: 

I had another thought on this, but no time to look into it.

Is there an SVN switch somewhere, that can force SVN to only use ASCII in its time stamps?

Steve White <Stevan_White>
Group administrator
Wed 03 Apr 2013 10:41:39 PM UTC, comment #2: 

Aha.

Well it's clear what has happened -- not clear what to do about it.

The Kanji (or Han) characters are being inserted by SVN running on your system.  I do not get these on mine. 

But... this could happen to any source file in any language that doesn't automatically accept non-ASCII.  Shall we alter all the ASCII source files in the world?  Or just those of FreeFont?

I could put in a line to tell it to accept, say Unicode... but this is only a partial fix.  If your system is configured to put some non Unicode encoding in, this could break it as well.

Furthermore, users of the font should start from the release tarballs, not the SVN.  (PLEASE NOTE: the SVN is a DEVELOPMENT environment.  It often contains BROKEN stuff.  DO NOT USE IT FOR PACKAGING!!!)

I'm leaning toward "not a FreeFont bug" on this one.
Please comment.

Steve White <Stevan_White>
Group administrator
Mon 01 Apr 2013 11:38:59 PM UTC, comment #1: 


__date__ = "$Date: 2012-04-24 20:09:08 +0900 (火, 24  4月 2012) $"

(ja_JP locale, I suppose), while I get that +verbatim+
_date_ = "$Date: 2012-04-24 13:10:12 +0200 (mar. 24 avr. 2012) $" -verbatim-
(I am under fr_FR). But in SVN, that line only contains +verbatim+__date__ = "$Date$"-verbatim-.

So it is not a bug in FreeFont per se, meanwhile adding an encoding declaration would probably help as a workaround.

Emmanuel Vallois <emmanuel_vallois>
Mon 01 Apr 2013 11:14:29 AM UTC, original submission:  

Under minimum chroot, tools that contain non-ascii characters cause
build failure as below, patch attached (or specify UTF-8 in that head).

make[3]: Entering directory `/tmp/buildd/fonts-freefont-20120503+svn2520/sfd'
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/TrueType", line 20
SyntaxError: Non-ASCII character '\xe6' in file ../tools/generate/TrueType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
make[3]: Leaving directory `/tmp/buildd/fonts-freefont-20120503+svn2520/sfd'
make[3]: Entering directory `/tmp/buildd/fonts-freefont-20120503+svn2520/sfd'
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
  File "../tools/generate/OpenType", line 20
SyntaxError: Non-ASCII character '\xe7' in file ../tools/generate/OpenType on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
make[3]: Leaving directory `/tmp/buildd/fonts-freefont-20120503+svn2520/sfd'
make[2]: Leaving directory `/tmp/buildd/fonts-freefont-20120503+svn2520'

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #27821:  use_utf-8.patch added by None (1KiB - text/x-diff)
file #27737:  use_ascii_characterset.patch added by None (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by Stevan_White (Posted a comment)
  • -email is unavailable- added by Stevan_White
  • -email is unavailable- added by emmanuel_vallois (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-04-23 Stevan_White StatusNeed info Fix posted
    2013-04-09 None Attached File- Added use_utf-8.patch, #27821
    2013-04-03 Stevan_White StatusNone Need info
        Assigned toNone Stevan_White
        Carbon-Copy- Added hideki yamane <henrich@debian.or.jp>
    2013-04-01 None Attached File- Added use_ascii_characterset.patch, #27737

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code