This is probably the UTF-16 Byte Order Mark (BOM).  If you can look at
this in hex, it would be helpful.  The BOM is FEFF for big-endian byte
order and FFFE for little-endian byte order.  Any UTF-16 display tool
should be aware of the BOM.

Gary

> -----Original Message-----
> From: Saigal, Ankur [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 02, 2002 2:08 AM
> To: [EMAIL PROTECTED]
> Subject: UTF-16 encoding
> 
> 
> Hi All,
> 
> Problem:
>  Some junk characters are written out after transformation 
> while using UTF-16 encoding.
> 
> Description :
> I get the "Transformer" object from the TransformerFactory 
> and then set the output property ("encoding") as "UTF-16".
> 
>                 transformer.setOutputProperty("encoding","UTF-16")
> 
> After this the result which I get carries 2 junk charcters 
> ("��<") before the actual expected stuff.
> 
> 
> 
> Can someone suggest me a solution for this problem?
> 
> Thanks and Regards,
> Ankur
> 
> PS : The incoming document is normal UTF-8 encoded.Can this 
> be an issue ??
> 

Reply via email to