From: Austin Ziegler Date: 2006-06-27T05:46:18+09:00 Subject: Re: Unicode roadmap? On 6/26/06, Izidor Jerebic wrote: > On 26.6.2006, at 21:46, Austin Ziegler wrote: > > I doubt this is in the least bit true. > > I'm saying that your cure is far worse than disease. > BTW, you may have no problems at all. We, on the other hand, have > lots of problems (in Ruby and other languages) which can be traced to > exactly this hope of "all programmers will be doing lots of manual > work to make things safe for others". You are deluded. Um. Not what I'm saying. I want as much clean autoconversion as possible without being forced into it. But much *more* than that, I want an API that works reasonably well with all sorts of encodings. I want String#[] to work equally well with Mojikyo, ASCII, ISO-8859-12, and UTF-8. > In environments which already have this cure (internal unicode), > there are no such enormous problems as we experience in those without > this cure. So sucessess and failures I describe are based on real > experience. Unlike your claims, which are just opinions. No, they're not just opinions. They're experiences that I've had with real situations as well where we have a hard time dealing with autoconversion. Stupid automatic behaviour is worse than manual behaviour *every time*. > > I couldn't make sense of your last paragraph. > Well, tell me what exactly do I get when this code executes: > > result = File.open( "file ) { |f| f.read( 1000 ) } Aside from a syntax error from your missing quote? ;) This would probably be an unencoded String. If you want an encoded String, you would specify it on the File object either during construction or afterwards. The need for ByteArray is nonexistent. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca