newtonandebe / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

Froms not downloading with UTF-8 encoding to phones from Aggregate #215

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Create a form with accent characters or any other chars that would require 
UTF-8.

2. Upload the form to Aggregate

3. Get the form on a device. The accent chars appear as garbage. (question 
marks on a black background.)

Using v1.0_alpha6, but seems to have always existed. 

Have been able to verify that the form is arriving on the phone as ANSI only. 
Should be ANSI as UTF-8 for example.

Have also verified that the problem is in FormXmlServlet.java. Specifically, 
the calls setCharacterEncoding and setContentType are being called after 
getWriter. They must be before if they are to have any effect. 
See:http://download.oracle.com/javaee/1.3/api/javax/servlet/ServletResponse.html
 for both of these functions  obtaining a PrintWriter, both of these methods 
should be called first.

Have verified that when both calls are placed above the instantiation of "out" 
(the PrintWriter) that this issue disappears and the forms appear correctly.

Original issue reported on code.google.com by jbmurphy...@gmail.com on 20 May 2011 at 1:41

GoogleCodeExporter commented 9 years ago

Original comment by wbrune...@gmail.com on 20 May 2011 at 8:24

GoogleCodeExporter commented 9 years ago
Issue 50 has been merged into this issue.

Original comment by wbrune...@gmail.com on 20 May 2011 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by jbmurphy...@gmail.com on 20 May 2011 at 10:00

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the bug report and documentation link.  It was extremely helpful.

Fixed several occurrences of these in the uiexperiment branch:
http://code.google.com/p/opendatakit/source/detail?r=abe448035657e9017036fad9620
66ab877add245&name=uiexperiment&repo=aggregate

(this branch will become the production 1.0 branch after we work out a few 
kinks).

Original comment by mitchellsundt@gmail.com on 20 May 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Sweet!

You're welcome.

-john

Original comment by jbmurphy...@gmail.com on 20 May 2011 at 10:26