Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
problem with encoding after passing string parameter to a report
jkr
I send to the birt (tomcat) application the following url:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>http://SERVER/birt/preview?__report=modip_app%2Fv3_6%2F%2Fapp.a3iologisi%2Fintertemporal_per_user.rptdesign&title=%22%CE%94%CE%B9%CE%B1%CF%87%CF%81%CE%BF%CE%BD%CE%B9%CE%BA%CE%AE%20%CE%95%CF%80%CE%B9%CF%83%CE%BA%CF%8C%CF%80%CE%B7%CF%83%CE%B7%20%CF%84%CE%BF%CF%85%20%CE%9C%CE%B1%CE%B8%CE%AE%CE%BC%CE%B1%CF%84%CE%BF%CF%82%20-%20%CE%A4%CE%91%CE%94%CE%95%22&evaluation_ids=11%2C549%2C1041%2C1766&empid=30</pre>
<br />
As you can see from the above url I have a parameter named "title" that I display in the report as a "data" or "dynamic text" (I have tried both) item that gets the value of the parameter.<br />
<br />
So I insert greek characters and do a urlencode on them but the output of the parameter on the report is scrambled and is certainly not greek.<br />
<br />
Also when I insert greek letters to the parameter window of the birt-eclipse environment, the characters are normally shown.<br />
<br />
Any ideas ?<br />
<br />
<br />
thank you
Find more posts tagged with
Comments
mwilliams
So, this issue is with the deployed viewer, only? What is your BIRT version?
jkr
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="110955" data-time="1351183139" data-date="25 October 2012 - 09:38 AM"><p>
So, this issue is with the deployed viewer, only? What is your BIRT version?<br /></p></blockquote>
<br />
I have tried both with 3.7.2 and 4.2.1
mwilliams
I'm looking at it in 4.2.1. From Eclipse, it doesn't seem to be splitting the %CE%94 (example) into the two parts. However, with the deployed viewer, the string is being decoded in the URL and showing the actual characters in the address bar. In the design, it splits the %CE - ? and %94 - ? and gives the individual character, for each, rather than the ?. I'll let you know if I find a solution.
jkr
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="111018" data-time="1351556353" data-date="29 October 2012 - 05:19 PM"><p>
I'm looking at it in 4.2.1. From Eclipse, it doesn't seem to be splitting the %CE%94 (example) into the two parts. However, with the deployed viewer, the string is being decoded in the URL and showing the actual characters in the address bar. In the design, it splits the %CE - ? and %94 - ? and gives the individual character, for each, rather than the ?. I'll let you know if I find a solution.<br /></p></blockquote>
<br />
<br />
Thank you<br />
<br />
I was thinking of sending a greek-to-latin-transliteration to the url and then transliterating back on the report code ...<br />
<br />
But I would prefer to avoid this
mwilliams
This appears to be a bug in the viewer. Please log a bug for this at eclipse.org/birt, in the bugzilla. If you could post the bug info in here, for future reference, too, that'd be great. Thanks!
jkr
It is already submitted as bug<br />
<br />
<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=169175'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=169175</a><br
/>
<br />
The solution is to change the tomcat directive: (at the end of the above link)<br />
<br />
<blockquote class='ipsBlockquote' ><p>yes. If you want to pass parameter in URL(Get method), you'd better change the default encoding iso-8859-1 to utf-8.<br />
<br />
Please find the server.xml file under conf folder and add URIEncoding="UTF-8" as following.<br />
<br />
<Connector port="8080" protocol="HTTP/1.1" <br />
connectionTimeout="20000"<br />
URIEncoding="UTF-8" <br />
redirectPort="8443" /><br />
<br />
Now you can pass parameter as UTF-8 encoded string in URL. Please check it.<br />
<br />
Thanks.</p></blockquote>
mwilliams
Ah. Good find. Thanks for updating the thread!