This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: thoughts on martin's proposed patch for GCC and UTF-8
- To: eggert at twinsun dot com (Paul Eggert)
- Subject: Re: thoughts on martin's proposed patch for GCC and UTF-8
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Tue, 22 Dec 1998 11:08:52 +0000 (GMT)
- Cc: rms at gnu dot org, martin at mira dot isdn dot cs dot tu-berlin dot de, gcc2 at gnu dot org, egcs at cygnus dot com
> In our company, when we import files from other sources, we typically
> transliterate them to an encoding suitable for our preferred working
> locale. This is the only plausible way to do things; otherwise, few
> of our text-processing tools would work. Even Emacs supports only
> _some_ of the Japanese encodings that we import -- e.g. it doesn't
> support UTF-8 or DBCS. Most other tools support only one character
> set and encoding at a time, and it is set from the locale environment
> variables in the usual way.
>
> If #locale were part of the source, we'd have more work to do, since
> we'd also have to munge the #locale directives of imported sources.
> This would be doable, but it would be a hassle, particularly when
> trading patches with our correspondents who use different encodings.
> I can easily see where people would screw this up.
Ok, how about not naming the locale, but describing it in a way so that it
gets automatically adjusted when you transliterate the file?
I.e. you pick a set of non-ASCII characters that are sufficient to
identify the locale, and for each of them, state their name, followed by
their encoding, followed by an ASCII delimiter that makes it possible to
detect where the end of a multibyte encoding is.