From: Martin Duerst Date: 2008-12-19T16:22:40+09:00 Subject: [ruby-core:20689] Re: 1.9 character encoding (was: encoding of symbols) At 18:22 08/12/18, Daniel Cavanagh wrote: >> I am against trancoding before comparison. The applications models >> falls into either: >> >> * treat single encoding only, say iso-8869-1 (single encoding model) >> * convert everything Unicode at I/O (universal encoding model) >> * mix various encoding per strings (multiple encoding model) >> >> Most of the applications use the former two, and mix encoding >> comparison happens only in the last one. So I don't think we need to >> make comparison more complex than it is now. > >comparison would barely become any more complex than it is now. the >extra code would be pretty much what i wrote in my original email. the >only complex part is the conversion function and that would immensely >useful anyway. are there any plans to introduce a simple, native >function like this (ie. something very unlike iconv ;) There is already native conversion (String#encode). Can you tell me what you think isn't simple enough with String#encode? >but if you're against late conversion (ie. at comparison and >concatenation) and you're against early conversion (ie. at I/O), i >don't think this is going to happen :) Did Matz say he's against early conversion? I think the only thing he says is that different people have different needs. Doing early conversion may be very fine in some cases, but not in others. Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp