Quantcast
Channel: PTC Community: Message List - Arbortext
Viewing all articles
Browse latest Browse all 3717

Anyone tackled PE and UTF-8?

$
0
0

I'm sending UTF8 encoded strings across http to the PE server but they're getting mangled into unusable strings.

 

For example:

<!-- 中,您将学如何使用 -->

 

becomes a garbled string, either:

<!-- 中 xEFxBC?XE6?XA8XE5XB0学习xE5xA6xBD?Xa* -->

 

or

<!-- ????????????? -->

 

depending on how I write to code on the server.

 

The internet/Java sites suggest a variety of fixes, none are working.

 

Some suggest adding enctyle or <meta> to my html form:

 

<form method="POST" action="http://132.253.204.201:8080/e3/servlet/e3" enctype="application/x-www-form-urlencoded; charset=utf-8">

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

 

These don't help.

 

Some suggest different combinations of ways to read the object at the server, like:

 

new FileOutputStream("D:\\UTF8Output_2.txt"), "UTF-8");

 

or

 

BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(request_XML_filename),"UTF8"));

 

or

 

BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(request_XML_filename),"UTF-8"));

 

None of these work.

 

Has anyone tacked this yet?


Viewing all articles
Browse latest Browse all 3717

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>