Dave Thomas said:
I need to understand this patch.
When we all talked about this (here on and ruby-core) a while back, the
consensus was that you can't really work with a file that has multiple
encodings: if you're editing with one encoding, it will mess up the
sections of the file that have another encoding. As I result, we didn't
go ahead with RDoc support for conditional comments based on encoding.
Firstly, sorry I haven't read the discussion. I subscribed to
ruby-talk about one year ago, but I was not interested in rdoc until
quite recently.
Secondly, you are right. IMHO, if multiple encoding consist of only
iso-8859-*, there would be no problem (in theory). But with Japanese
encoding (Shift_JIS or EUC-JP), it will mess up others. So the first
example of 'automatic charset conversion' is my mistake.
Thirdly, the second example of 'automatic charset conversion' is
usefull in some case. All comments are written in utf-8 and converted
to proper encoding on generateing html files. For example, older
browsers could not read utf-8, so I want to change the encoding to
EUC-JP. But it could be done for the html files which are generated by
rdoc. Hmm.
Did we get it wrong? It would be wonderful if we could support multiple
languages, encodings, and character sets in the same comment blocks.
Confused of Dallas
Sorry.