From: Michal Suchanek Date: 2008-01-11T01:51:16+09:00 Subject: Re: Draft of some pages about encoding in Ruby 1.9 On 10/01/2008, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Draft of some pages about encoding in Ruby 1.9" > on Fri, 11 Jan 2008 00:41:37 +0900, Dave Thomas writes: > > |Also, is there a programmatic way to list the aliases for an encoding? > > All of them? No. Since encoding is dynamically loaded, we didn't > emphasize listing. Do you (and others) think it is needed, in > practice? Certainly listing anything us useful ;-) In this particular case any interactive application that deals with encodings should be able to do better than "We don't have that". However, since on-demand string conversion is not supported it might be easier to just convert the everything into single encoding .. if that's possible. Still a version of Ruby might have built-in encoding that iconv does not understand so we still need to know. How do you imagine the encodings will be used if nobody knows they exist? Perhaps a library that handles input of data from somewhere would try to label the string, and if it does not work it would have to convert? Or should applications just convert everything? Perhaps that's the way to go since Ruby does not support on-demand conversion unless monkey-patched. This will discourage the use of the different encodings we have, though. Thanks Michal