You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by David N Bertoni/Cambridge/IBM <da...@us.ibm.com> on 2003/02/04 01:04:47 UTC

RE: std::istream as XSLTInputSource




Hi Don,

This is all very confusing, so I'm going to ask someone else what their
opinion is.  The second URL points to part of the recommendation that's
non-normative, but I may be mis-reading the first part.

Dave



                                                                                                                                           
                      "Don McClimans"                                                                                                      
                      <dmcclimans@IntiElect         To:      "David N Bertoni/Cambridge/IBM" <da...@us.ibm.com>                  
                      ronics.com>                   cc:                                                                                    
                                                    Subject: RE: std::istream as XSLTInputSource                                           
                      01/31/2003 12:06 PM                                                                                                  
                                                                                                                                           



>>If so, do I have to start the stream with a BOM, for the parser to
>>recognise it as UTF-16?
>
>You have to do what the XML recommendation says:
>
>   http://www.w3.org/TR/REC-xml#charencoding
>   http://www.w3.org/TR/REC-xml#sec-guessing
>
>So the answer is yes.

Dave,

Hmm, as I read that second URL, the answer is no. It says that using a byte
order mark is fine, but without a byte order mark, the parser should be
able
to tell what encoding is being used by looking at the first four bytes of
the file, which should be "<?" in UTF-16.

Don