lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> Luiz Henrique de Figueiredo wrote:
> > To avoid bloat and also because the perfect place for such a feature is
> > in a text-encoding library (which would also handle base64, ascii85, etc.)
> > Also, it is trivial to write it in Lua:
> >   
> It may be trivial, but hexadecimal formats are pretty much a united
> feature across all programming languages with escape sequences in
> strings. [...]

Not exactly a "united" feature, as each language seems to present
a slightly different mechanism for hexadecimal characters:

  * "\x7": ok in Perl and C, error in Python ("invalid \x escape").
  * "\x445": ok in Perl and Python (meaning "D5"), undefined
    behavior in C. (ISO says it is an error, my gcc gives a warning
    and uses the value "E".)

-- Roberto