This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: thoughts on martin's proposed patch for GCC and UTF-8


> 	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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]