Home arrow static arrow Java Programming [Archive] - [httpclient] bad encoding
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - [httpclient] bad encoding
This topic has 1 reply on 1 page.

Posts:7
Registered: 7/9/04
[httpclient] bad encoding  
Jul 9, 2004 5:19 AM



 
Hello everybody

I put this code in a Java application :

System.getProperties().setProperty("httpclient.useragent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)");
System.setProperty("apache.commons.httpclient.cookiespec", "COMPATIBILITY");
HttpClient client = new HttpClient();
HttpMethod method = new GetMethod(adresse);
method.setRequestHeader("Accept-Language","fr");
method.setRequestHeader("Accept-Charset", "ISO-8859-1, utf-8");

But when I download an HTML page, the encoding is bad.

For example, I get the character "��" instead of getting "�"

What can I do for resolving my problem ?

Thank you for advance

Mathias
 

Posts:7
Registered: 7/9/04
Re: [httpclient] bad encoding  
Jul 9, 2004 5:26 AM (reply 1 of 1)



 
Thank you Jive Forum :-(

Don't take care of the example I give, the encoding is also bad in this forum
 
This topic has 1 reply on 1 page.