From: Eric B. <er...@go...> - 2007-07-26 14:14:19
|
Colin Paul Adams wrote: >>>>>> "Colin" == Colin Paul Adams <co...@co...> writes: > > Colin> I am going to add valid_utf16le and make_from_utf16le > Colin> routines. A very straight-forward implementation would be > Colin> to pass Little_endian + argument to valid_utf16 and > Colin> make_from_utf16 respectively. > > Colin> However, as this involves creating a temporary, which could > Colin> be large and costly, my feeling is to forget about code > Colin> sharing and write the implementations out in full. > > I've done this, and also added valid_utf16be/make_from_utf16be too, > for similar reasons (it's a pretty obscure use-case, but if you have a > UTF-16BE string whose first character is zero-width-unbreakable-space, > then you can't use make_from_utf16, as that routine will assume the > first character is a BOM, and discard it, so you have to prepend the > BOM yourself). > > I've also added tests which pass on all three compilers. > > May I check these in? Fine with me. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |