Re: Guile integration and UTF-8
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.comp.gnu.make.devel |
|---|---|
| Message-ID | <[email protected]> |
> From: Paul Smith <[email protected]> > Date: Tue, 24 Sep 2013 22:31:29 -0400 > Cc: [email protected], Lars Ljung <[email protected]> > > I haven't made a formal definition, but I'm seriously leaning towards > declaring that makefiles are UTF-8, always, and not supporting other > encodings. Given that the difference is using scm_file_encoding instead of scm_from_utf8_string, I don't see the reason why we should impose such a restriction. Using "-*- coding: -*-" cookies is quite commonplace in the Free Software world, so it's not like Make will suddenly invent a new protocol. We can use UTF-8 as the default, in the absence of a cookie, which I think will do what you want without unnecessarily restricting those who might need a different encoding. If you wonder when a non-UTF-8 encoding might be needed, then imagine a Makefile which invokes some utility with a non-ASCII string argument in a locale that isn't UTF-8. Also, for arguments that come from the Make command line (as in "make FOO='bar'") the string will come in the locale's encoding, which will not always be UTF-8; in that case, assuming UTF-8 is wrong, and we should use scm_c_eval_string as we do now. I'm sure there's any number of similar use cases out there. From Emacs's experience, it is very important to get this stuff right the first time (Emacs didn't), otherwise users become very annoyed. Therefore, I suggest a serious discussion before any decisions are made.