Note that there are some explanatory texts on larger screens.

plurals
  1. POMultibyte Characters corrupt to ???? when read from database and posted to ASP Page using HTTPURLConnection
    text
    copied!<p>In my java code,I am retrieving some multibyte data from database and making some xml DOM, with that data as the value of some node then converting the DOM to String and posting bytest to ASP Page via HTTPURLConnection , but somehow at receiver end the data is appearing as ???? instead of some multibyte values.Please suggest what to do.</p> <p>Things that i am already doing..</p> <p>1) I have set <code>-Dfile.encoding =UTF8</code> as System Property 2)While using <code>TransformerFactory</code> for converting my XML DOM to String , i have set </p> <pre><code> transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8") </code></pre> <p>to make sure that the encoding is proper there. Please suggest where i am getting wrong.</p> <p>@Jon Skeet Few more things to add here... 1) I am getting data from database correctly 2) Transformed XML also appears to be proper, as i checked by saving it to my local file system.<br> For posting earlier i was using something like </p> <pre><code>'dout = new DataOutputStream(urlconn.getOutputStream());' 'dout.write(strXML.getBytes());' 'dout.write(strXML);' </code></pre> <p>and the resulting data at the receiver end was getting converted to ????? but then i switched to<br> '</p> <pre><code>dout=new OutputStreamWriter(urlconn.getOutputStream(),"UTF8");' 'dout.write(strXML);' </code></pre> <p>then data at receiver end appears to be proper ... but the problem occurs with the way it is handled at receiver end in this case. in my receiver ASP code i am using <code>objStream.WriteLine (oXMLDom.xml)</code> ... and here it fails and starts to give internal server error... please suggest whats wrong with second approach.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload