[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format bug
Re: format bug
Thu, 31 May 2007 13:23:28 -0600
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:220.127.116.11) Gecko/20070221 Thunderbird/18.104.22.168 Mnenhy/0.7.5.666
-----BEGIN PGP SIGNED MESSAGE-----
According to Daniel Richard G. on 5/31/2007 9:24 AM:
> A couple of comments on the format change:
> Love the gain of \NNN, \xHH et al. escape sequences. Will this include
> locale-dependent multi-byte characters with \uHHHH and \uHHHHHHHH as well?
> Leery of making "%c" == "%.1s". This behavior doesn't seem terribly useful.
But it would match what /bin/printf does, and nobody complained about that
being not terribly useful when it was standardized in POSIX.
> Also, once the transition period is over, the only way to specify a
> non-literal character will be via \NNN, \x or \u, yes? All of which require
> an octal or hex argument. What would I do if I have an eval()---whose
> result is decimal---and I want to convert the result to a character?
eval() takes a second argument - if you are computing a value, it is just
as easy to compute it in octal or hex to begin with. For example,
format(`%b', `\0'eval(computation, `8'))
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----