Subject: Re: bug#5235: 23.1; Unibyte keyboard input problem

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Dec 2009 21:27:59 +0200

> Date: Thu, 24 Dec 2009 23:21:41 +0800
> From: Jason Rumney <[email-masked]>
> Cc: Tomasz Zbrożek <[email-masked]>,
> 	[email-masked], [email-masked]
> 
> The problem here is the files, not Emacs.

I'd say, more accurately: the problem is that Emacs does not support
such use-cases.  It would be nice if we did: having comments in one
encoding and strings in another is not such a corner case.

> I work on similar files in my day job, with Japanese comments in 
> ShiftJIS and Chinese comments in GB2312. An easy method of fixing such 
> files would be nice, but the best I can think of would be to provide a 
> recode-region function

We would also need a way to encode different regions differently.
Perhaps adding special text properties to guide the encoding process
would be a way of doing that (we already have charset properties for
similar reasons).