From: Emmanuel S. [ES] <ma...@ei...> - 2007-07-26 14:57:02
|
Looks strange to me that the BOM is part of the string. In my opinion it should not. If I understand you well, you want to have a smart `make_from_utf16' that uses the BOM to identify wether it is little endian or big endian? You are better off having `make_from_utf16 (a_content: STRING; a_bom: STRING)' (assuming your make_from_utf16 takes a string). Regards, Manu > -----Original Message----- > From: gob...@li... > [mailto:gob...@li...] On > Behalf Of Colin Paul Adams > Sent: Thursday, July 26, 2007 6:58 AM > To: gob...@li... > Subject: Re: [gobo-eiffel-develop] UTF-16LE > > >>>>> "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? > -- > Colin Adams > Preston Lancashire > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and > a browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/ _______________________________________________ > gobo-eiffel-develop mailing list > gob...@li... > https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop > |