On Sun, Nov 04, 2007 at 07:21:55PM +0000, Stephen Compall wrote: > On Sun, 2007-11-04 at 14:00 +0100, Robin Redeker wrote: > > And indeed, skipping the iconv step would just test the JSON parser > > itself. In my application that uses the JSON parser I actually can't > > skip that step as I get the data from the network and have to run it > > through iconv anyways. > > I don't mean the input; of course that should be iconved. I'm referring > to the data structures produced by the program. > > A UnicodeString, if written out, may do the conversion anyway in a way > similar to how it's done now; however, it will also first ask whether > the stream supports UnicodeString handling, in which case it'll rely on > the stream to recode it properly. > > With the attached patch and removing use of "outputEncoding" from the > example, I got 2/22/3 with a great reduction in outliers (opposed to > 5/34/14 before). > > Let me know if you like it and I'll add it to my archive. >
I like it! Especially the 5/34/14 -> 2/22/3 is incredible! > - str := ReadWriteStream on: UnicodeString new. > + str := WriteStream on: (UnicodeString new: 8). Whats the magic behind 8? Robin _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
