[Freeipa-devel] not ascii, not utf-8, what's a parser supposed to do?
Howard Chu
hyc at symas.com
Tue Jan 26 23:12:40 UTC 2010
John Dennis wrote:
> I've run into a small problem with xgettext. By default xgettext expects
> all strings in an input file to be encoded in ascii. It will also allow
> you to override that by specifying the strings in the input file are utf-8.
Do you ever expect to run this stuff on IBM mainframes (i.e., systems using
EBCDIC or some other non-ASCII-related character set) ?
> Can you think of another way to express the offending string such that
> it doesn't trigger the non-ascii error? The only thing I could think of
> and get to work was this:
>
> SAFE_STRING_PATTERN='%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c'
> % \
> (40,94,40,0,124,10,124,13,124,32,124,58,124,60,41,124,91,0,10,13,128,45,255,93,43,124,91,32,93,43,36,41)
>
> Which is pretty unreadable, but with sufficient comments could be
> acceptable.
I had to use similar hacks when porting OpenSSL to z/OS. It kinda sucks, but
it has the virtue of being completely independent of the machine's language
settings. And frankly, it doesn't take too much explanation in the comments to
be understandable.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
More information about the Freeipa-devel
mailing list