Re: XM_EIFFEL_INPUT_STREAM
Colin Paul Adams <colin-vnRo6g/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Eric" == Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]> writes: Eric> Colin Paul Adams wrote: >>>>>>> "Emmanuel" == Emmanuel Stapf [ES] <Emmanuel> writes: Emmanuel> Shouldn't position take those into account? If not, Emmanuel> shouldn't we have a query in XM_EIFFEL_PARSER or Emmanuel> XM_EIFFEL_INPUT_STREAM to get the starting offset in the Emmanuel> stream? >> No it shouldn't - the BOM is not considered a part of the >> file. An XML editor should display the first character after >> the BOM as at line 1 column 1. Eric> This answers only the first question. Is there a way to know Eric> whether there is a BOM (I guess that in that case the offset Eric> is always 2) or should we scan the beginning of the Eric> file/stream by hand to figure that out? knowing the Eric> position relative to what is shown in an editor is one Eric> thing, knowing the position in the input stream is another Eric> that could also be interesting. Franck designed this class, so he can give the authoritative answer, but the obvious design is that the BOM never appears in the stream at all - it is consumed as part of the encoding detection. The position indicated by XM_POSITION is in terms of unicode characters, not bytes in the file, I would think. But we better wait for Franck to answer. -- Colin Adams Preston Lancashire To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/gobo-eiffel/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/