You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by martin hilpert <te...@hipposen.de> on 2004/03/18 14:10:11 UTC
httpclient dont support ö ?
Danke Ronald,
hat geklappt.
nun habe ich noch das problem das er kein Dateien mit umlauten versenden
kann,z.b Übung1.txt
irgendeine idee das zu lösen?
gruß martin
PS: Ronald, du bist mir eine große hilfe.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
Re: httpclient dont support ö ?
Posted by Oleg Kalnichevski <ol...@apache.org>.
Sven
This is not entirely correct. One can still use
HttpMethod#setQueryString(String) to set hand-crafted query string
GetMethod httpget = new GetMethod("http://www.whatever.com/);
NameValuePair[] params = new NameValuePair[] {
new NameValuePair("text", s)
};
httpget.setQueryString(EncodingUtil.formUrlEncode(params, "ISO-8859-1"));
Oleg
On Thu, 2004-03-18 at 19:45, Sven Köhler wrote:
> > There are two exceptions to this. One is in the case of the URL query
> > string, the other is for some authentication methods.
> >
> > For more on the query string take a look at
> > <http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpMethodBase.html#setQueryString(org.apache.commons.httpclient.NameValuePair[])>
>
> So where's the sollution?
>
> Using UTF-8 for the query-string is neither right nor wrong. The
> server-side (servlet, perl-script, whatever) may simple use any charset
> it likes to interpretate the query-string.
> It is a insufficiency of the HttpClient-API that i cannot specifiy the
> charset used for the query-string.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
Re: httpclient dont support ö ?
Posted by Sven Köhler <sk...@upb.de>.
> There are two exceptions to this. One is in the case of the URL query
> string, the other is for some authentication methods.
>
> For more on the query string take a look at
> <http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpMethodBase.html#setQueryString(org.apache.commons.httpclient.NameValuePair[])>
So where's the sollution?
Using UTF-8 for the query-string is neither right nor wrong. The
server-side (servlet, perl-script, whatever) may simple use any charset
it likes to interpretate the query-string.
It is a insufficiency of the HttpClient-API that i cannot specifiy the
charset used for the query-string.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
Re: httpclient dont support ö ?
Posted by Michael Becke <be...@u.washington.edu>.
There are two exceptions to this. One is in the case of the URL query
string, the other is for some authentication methods.
For more on the query string take a look at
<http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpMethodBase.html#setQueryString(org.apache.commons.httpclient.NameValuePair[])>
In the case of authentication it is a little more complicated, as it
depends on the authentication method. Basic authentication uses
ISO-8859-1 for username and password. Digest uses ISO-8859-1 for
username and password, but the username can really only be in ASCII,
since it is passed as plain text in the header. NTLM only supports ASCII.
Mike
Sven Köhler wrote:
>> nun habe ich noch das problem das er kein Dateien mit umlauten versenden
>> kann,z.b Übung1.txt
>
>
> I guess you're talking about the content-disposition header or
> http-headers with umlauts in general - i think there's no standard for
> sending them.
> First, i have to define a http-header to be more like a byte[]-array
> than a String (in the Java sence). The bytes will have to be
> interpretated by a Charset like UTF8, ISO8859-1 etc. to become a String
> on the client-side. MaxOSX might use UTF8, Linux and Windows should use
> the current locale. So there is no correct way to store a umlaut in a
> HTTP-header since HttpClient cannot know the Charset that the client
> will use.
>
> The Charset for the Headers and the Charset used for the URL are one of
> the weaknesses of the HTTP-Protocol. UTF8 may become a standard - but
> this will surely take a while.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
Re: httpclient dont support ö ?
Posted by Sven Köhler <sk...@upb.de>.
> nun habe ich noch das problem das er kein Dateien mit umlauten versenden
> kann,z.b Übung1.txt
I guess you're talking about the content-disposition header or
http-headers with umlauts in general - i think there's no standard for
sending them.
First, i have to define a http-header to be more like a byte[]-array
than a String (in the Java sence). The bytes will have to be
interpretated by a Charset like UTF8, ISO8859-1 etc. to become a String
on the client-side. MaxOSX might use UTF8, Linux and Windows should use
the current locale. So there is no correct way to store a umlaut in a
HTTP-header since HttpClient cannot know the Charset that the client
will use.
The Charset for the Headers and the Charset used for the URL are one of
the weaknesses of the HTTP-Protocol. UTF8 may become a standard - but
this will surely take a while.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
Re: httpclient dont support ö ?
Posted by Roland Weber <RO...@de.ibm.com>.
Hello Martin,
that's probably a missing content encoding or character set
in the file part you are trying to send. This problem pops up
on a regular basis, you will find information in the mailing list
archive not too far back.
By the way, if you expect anyone else to answer your
questions, you will have to write mails in english. It's
the official language for this mailing list. I don't know
how long I can answer german mails until folks start
picking on me. It is impolite to post non-english mails
in an english mailing list repeatedly, and it may be
considered impolite to encourage this behavior by
answering.
cheers,
Roland
"martin hilpert" <te...@hipposen.de>
18.03.2004 14:10
Please respond to "Commons HttpClient Project"
To: "Commons HttpClient Project"
<co...@jakarta.apache.org>
cc:
Subject: httpclient dont support ö ?
Danke Ronald,
hat geklappt.
nun habe ich noch das problem das er kein Dateien mit umlauten versenden
kann,z.b Übung1.txt
irgendeine idee das zu lösen?
gruß martin
PS: Ronald, du bist mir eine große hilfe.
---------------------------------------------------------------------
To unsubscribe, e-mail:
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
commons-httpclient-dev-help@jakarta.apache.org