From: Martin Duerst Date: 2007-10-30T14:39:22+09:00 Subject: Re: Implementation of "guessUTF" method - final questions At 21:11 07/10/29, Nikolai Weibull wrote: >On 10/29/07, Martin Duerst wrote: >> At 17:50 07/10/29, Nikolai Weibull wrote: >> In theory, yes. However, for many encoding (e.g. the ISO-8859-X >> series), the answer would always be 'yes'. That would make these >> methods easy to implement, but the result would be rather useless. > >Not necessarily. There are still ranges in 0..255 that the ISO-8859-X >don't use, for example, >ISO-8859-1 = UNION(7..10, 12..13, 27, 32..126, 133, 164..255). That's just one way to look at ISO-8859-1. In many ways, it's not too bad, but in many ways, it's extremely arbitrary. I wouldn't want to bake this into Ruby. >Also, >the question of what is useful here is rather much up to the user. >The returned list of Encodings that believe themselves capable of >decoding the input would have to be discriminated somehow. In an >interface, for example, the application could present the user with >the list of Encodings and let them choose one. Well, yes, but if possible, we'd like to avoid this. Users shouldn't have to care about character encodings. Regards, Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp