[
http://issues.apache.org/jira/browse/BEEHIVE-1032?page=comments#action_12361327
]
Jin Kudo commented on BEEHIVE-1032:
-----------------------------------
As more research of testrecorder source code, I had some miss understanding to
handle the data by this tool. In case of storing the recorded data to xml file,
it is by web application on application server. And the data is already
converted of character encoding by application server side. That means the tool
already get the String object from application server. So the request encoding
determination is depends on application server implementation. So binary
storing is not meaningful by testrecorder side. So we should consider by
testrecorder tool side, store the data to the xml file correctly in
testrecorder server side and what encoding is used by testrecorder client side.
So we should do the following step.
Step1: Currently the testrecorder server convert the String object to bytes
array using ISO-8859-1 encoding and back to it to String using UTF-8 encoding.
That works if all data is ASCII only, but other character get garbled. So it
should not do anything on this.
Step2: Currently the testrecorder server side store the data using
file.encoding to xml file, but xml prologue name is defined as UTF-8. That
cause to generate the wrong xml file. So it should be changed always store the
UTF-8 encoding to the xml file.
Step3: Currently the testrecorder client side send the data using file.encoding
to the server. So it can be configurable by testrecorder configration file or
just always use UTF-8. Second implementsation cause the limitation only use
UTF-8 encoding as request encoding in any JVM encoding environment and it
required application server can handle the request encoding as UTF-8 encoding
in some way.
In case of Weblogic Server, it have to do the following options.
* setCharacterEncoding("UTF-8");
* Define input-charset param in weblogic.xml as follows
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF-8</java-charset-name>
</input-charset>
</charset-params>
* Define webapp.encoding.default parameter of application-param in
weblogic-application.xml as follows
<application-param>
<param-name>webapp.encoding.default</param-name>
<param-value>UTF-8</param-value>
</application-param>
If we implement only Step1, in case of the VM encoding is UTF-8 encoding and
application server can handle request data as UTF-8 encoding, it works fine.
> TestRecorder handle request encoding
> ------------------------------------
>
> Key: BEEHIVE-1032
> URL: http://issues.apache.org/jira/browse/BEEHIVE-1032
> Project: Beehive
> Type: Test
> Components: NetUI
> Versions: V1
> Reporter: Jin Kudo
>
> Currently the test recorder always handle the request encoding as ISO-8859-1.
> That is cause to none ASCII characters can't be stored in the recording data
> file correctly. Request encoding determination is not so easy, but I suggest
> as the reasonable solution testrecorder use the platform encoding as request
> encoding rather than fixed ISO-8859-1 value.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira