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!
|
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.
|
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.
|
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'
|