make-alpha
[Top][All Lists]
Advanced

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

Re: New escape method proposal (was: Re: Possible solution for special c


From: Paul Smith
Subject: Re: New escape method proposal (was: Re: Possible solution for special characters in makefile paths)
Date: Wed, 23 Apr 2014 13:43:21 -0400

On Wed, 2014-04-23 at 19:35 +0300, Eli Zaretskii wrote:
> > The resulting encoded string will be compatible with any character
> > encoding which uses ASCII-compatible meanings for characters codes
> > 0-127.
> 
> What about non-ASCII characters?  Make works in the current locale
> (AFAIK), so non-ASCII characters can have arbitrary single- or
> multi-byte encodings.  Will the above encoding of special characters
> be compatible with the locale-encoded non-ASCII characters?

As long as whatever encoding is used provides the same meaning for
character codes 0-127 (that's what I was trying to say above).  So a
multi-byte encoding is fine, as long as it doesn't re-use the values
0-127 in the encoding to mean something else in the second or subsequent
bytes.

So, fixed length multibyte encodings like UTF-16 or UTF-32 won't work
(IIUC), but UTF-8 and any other variable-length encoding that preserves
the first 127 ASCII character codes will work.

Actually the restriction is already there in make since make doesn't do
anything at all special for multibyte today, and does a lot of string
parsing based on standard ASCII characters.  For example make already
matches against "}" which is ASCII 125; if that appeared as the second
byte in a multi-byte encoding it would break make today.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]