From: Bob Hutchison Date: 2001-11-12T22:08:11+09:00 Subject: [ruby-talk:24925] Re: XML libraries (Re: Re: ruby and webservices) On 01/11/12 5:18 AM, "Sean Russell" wrote: > Martin v. Loewis wrote: >> That is also the approach Python took; you also need a powerful >> encoding library to go with the character string type, to convert >> between byte strings and character strings. > > By byte strings, do you mean ASCII strings? There is a problem caused by history that can be partially illustrated by IO. IO moves buffers of bytes around, not buffers of characters. So, for example, if you get a buffer back from file IO or a socket (or almost anything else) you are getting bytes. Some of these bytes may be doubles, some integers, some characters. You need to provide library routines to grab characters/strings from these byte buffers (and, of course, put them into byte streams). A lot of code is going to break -- there is *so* much code out there that explictly/implicitly equates a character with a byte then builds on this assumption. This is probably best handled through the libraries provided by the programming language, though I don't this this can solve everything. Even though Java provides the tools, there is still a lot of code being written right now that doesn't get this right. I don't know the situation with Python. What we have not begun to talk about is localisation (note the spelling, this is spelled correctly where I come from :-) > > --- SER