Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utf8 url encoding not supported by deffault in jdk's older than 1.4 #847

Closed
asfimport opened this issue May 10, 2002 · 5 comments
Closed

Comments

@asfimport
Copy link
Collaborator

Marouane Bouzoubaa (Bug 8961):
I was trying to use jmeter to test our new Arabic web search engine, but things
were not working well until I found out that the arabic "arguments" that are in
utf8 were not encoded correctly. the URLEncoder/URLDecoder (in jdk's older than
1.4) use the default system encoding. jdk1.4 supports new versions of this
methods that take two parameters: String to be encoded and the encoding to use
for encoding.
I just didn't have time to figure out which source file to edit to make the
needed changes.

Severity: normal
OS: All

@asfimport
Copy link
Collaborator Author

Mike Stover (migrated from Bugzilla):
I don't know what to do with this one. I would think JMeter should use the
local encoding. You are putting in utf-8 codes to simulate Arabic characters
because you are on a non-arabic machine? If JMeter used utf-8 rather than the
local encoding, wouldn't that also create problems for some people? The only
other option is to give people a choice of encodings in the GUI...

I'm just not sure how to resolve your problem that will also work for everyone
else.

@asfimport
Copy link
Collaborator Author

rOnn (migrated from Bugzilla):
This comments may or may not be applicable since this bug is already several
months old.

I've run in to this problem with my application in the past. The way i got
around the problem is to set file.encoding system property to ISO8859_1
(because jdk makes that assumption).

@asfimport
Copy link
Collaborator Author

Jordi Salvat i Alabart (migrated from Bugzilla):
Can someone be more specific on what this bug is about?

Provide a way to reproduce it, explain what the expected results are, and where
actual results deviate from them?

I'll currently reduce severity from Blocker to Normal (can't be a blocker if
it's been open for so long!), and I'll close as INVALID if we don't get more
info in a week or so. (Of course it can always be reopened).

@asfimport
Copy link
Collaborator Author

Oliver Rossmueller (migrated from Bugzilla):
If you have a web app which expects the client requests to be in a specific
character encoding (e.g. it is an arabic web site and the servlet expects the
requests to be utf-8) you need a way to tell JMeter which encoding to use to
simulate clients using that encoding.

The solution would be to provide a way to set the character encoding to be used
by an http request (text field or combo box for example). But this would also
require a full switch to J2SE 1.4, because there is no way to set the character
set for url encoding in earlier java releases.

@asfimport
Copy link
Collaborator Author

Matthew Faull (migrated from Bugzilla):
I'm using JMeter against a utf-8 website with alot of Japanese content. Using
the latest tar ball (20/05/2003) this doesn't work. The posted values aren't
encoded correctly. Thus I've temporarily altered the following file(in my
source) until I can find or do a more complete solution:
"org.apache.jmeter.protocol.http.util.EncoderCache.java"
I changed:
encodedValue = URLEncoder.encode(k);

To:
try{
encodedValue = URLEncoder.encode(k, "utf8");
}
catch (UnsupportedEncodingException e)
{
System.out.println("Don't support utf8 encoding??");
e.printStackTrace();
}

Yes - I know my exception handling here is bad :-p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant