encoding issue

87 views
Skip to first unread message

PaulZH

unread,
Jun 25, 2012, 11:51:33 AM6/25/12
to topbrai...@googlegroups.com
I have as a result of an XSLT transformation XML which is well-formed.
 <http://www.vlaanderen.be/school/S013938> <http://purl.org/dc/terms/title> "Vrije Kleuterschool - Mozaïek".

However when I pass this xml as parameter sml:content to an instance of sml:PostRequest the receiving server is complaining
"The request sent by the client was syntactically incorrect (Invalid UTF-8 start byte 0x95 (at char #1829, byte #-1))."
and indeed when I capture the http transmission I see
<http://www.vlaanderen.be/school/S013938> <http://purl.org/dc/terms/title> "Vrije Kleuterschool - Moza••ek".


Screen Shot 2012-06-25 at 17.50.48.png

Gokhan Soydan

unread,
Jun 25, 2012, 2:21:37 PM6/25/12
to topbrai...@googlegroups.com
Paul,

This encoding issue seems to be from the way TBC handles content for the post request. The sml:content object is treated as a string at the sml:PostRequest module implementation level. So, while the result of XSLT transformation in SPARQLMotion is a XML object, it gets converted to a string object for the post request.

One possible work-around for this is to set the flag:
-Dfile.encoding=UTF8

in [TBC-installation-folder]/TopBraid Composer.ini.orig file.

Here are the instructions (slightly modified from the original instructions in my related posts on an older issue at: https://groups.google.com/d/topic/topbraid-users/2yZn2dn5VTA/discussion )

1) Exit TopBraid Composer, if it is running.
2) At the installation folder of TopBraid Composer, open "TopBraid
Composer.ini.orig" in any text editor. (it is an .orig file, because the actual .ini file gets overwritten at startup - this is a new design as of TBC-3.6.x).
3) Add the following line (flag) at the very end of the file (don't forget the "-" character):
-Dfile.encoding=UTF-8

4) Start TopBraid Composer.
5) Now all the string encodings in TopBraid Composer and SPARQLMotion will be in UTF-8 encoding by default.

However, use this work-around with care, because it may cause issues with non-UTF-8 encoded files in your workspace. In such a case, you could simply remove the flag and restart TBC.

I will check with my colleagues on how and when we will have a solution for this issue.

Gokhan






--
-- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to topbrai...@googlegroups.com To unsubscribe from this group, send email to topbraid-user...@googlegroups.com For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en

PaulZH

unread,
Jun 25, 2012, 3:16:07 PM6/25/12
to topbrai...@googlegroups.com
Hi Gokhan,

Tried this, but with no succes.

My TopBraid Composer.ini.orig within the Package contents on Mac (Contents->MacOS)
ends now with -Dfile.encoding=UTF-8.

Paul

Gokhan Soydan

unread,
Jun 25, 2012, 5:55:50 PM6/25/12
to topbrai...@googlegroups.com
Paul,

Could you check if TopBraid Composer.ini file (the one without the .orig) also has the line -Dfile.encoding=UTF-8 ? It should have been automatically copied over from the .orig file, when you restarted TBC. If not, I would suggest putting that line also into the TopBraid Composer.ini file.

Gokhan


PaulZH

unread,
Jun 26, 2012, 3:31:00 AM6/26/12
to topbrai...@googlegroups.com
It wasn't copied to the .ini file, so I copied it myself.
Now it doesn't choke anymore on the encoding issue, but I run now into other problems.
TBC hangs at the end of the script. Do some more investigation.


Paul


On Monday, June 25, 2012 11:55:50 PM UTC+2, Gokhan Soydan wrote:
Paul,

Could you check if TopBraid Composer.ini file (the one without the .orig) also has the line -Dfile.encoding=UTF-8 ? It should have been automatically copied over from the .orig file, when you restarted TBC. If not, I would suggest putting that line also into the TopBraid Composer.ini file.

Gokhan


On Mon, Jun 25, 2012 at 10:16 PM, PaulZH <pa...@proxml.be> wrote:
Hi Gokhan,

Tried this, but with no succes.

My TopBraid Composer.ini.orig within the Package contents on Mac (Contents->MacOS)
ends now with -Dfile.encoding=UTF-8.

Paul



On Monday, June 25, 2012 5:51:33 PM UTC+2, PaulZH wrote:
I have as a result of an XSLT transformation XML which is well-formed.
 &lt;http://www.vlaanderen.be/school/S013938&gt; &lt;http://purl.org/dc/terms/title&gt; "Vrije Kleuterschool - Mozaïek".

However when I pass this xml as parameter sml:content to an instance of sml:PostRequest the receiving server is complaining
"The request sent by the client was syntactically incorrect (Invalid UTF-8 start byte 0x95 (at char #1829, byte #-1))."
and indeed when I capture the http transmission I see
&lt;http://www.vlaanderen.be/school/S013938&gt; &lt;http://purl.org/dc/terms/title&gt; "Vrije Kleuterschool - Moza••ek".


--
-- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN. To post to this group, send email to topbraid-users@googlegroups.com To unsubscribe from this group, send email to topbraid-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en

PaulZH

unread,
Jun 26, 2012, 9:19:43 AM6/26/12
to topbrai...@googlegroups.com
The hanging was also caused by the older Java version.
Reply all
Reply to author
Forward
0 new messages