On Thu, Sep 11, 2014 at 3:45 PM, Arne Goedeke el@laramies.com wrote:
I would split the current utf8 encoder/decoder into 2 functions, one for calculating the length of the result and one doing the actual encoding/decoding. f_utf8_to_string could then call those two directly, as could IOBuffer. Sounds ok?
Well, yes, as long as it is not slower (and, perhaps most importantly, does not create new strings in the somewhat common case where there is no change when doing the encoding/decoding)