Note that there are some explanatory texts on larger screens.

plurals
  1. POURI encoding in UNICODE for apache httpclient 4
    primarykey
    data
    text
    <p>I am working with apache http client 4 for all of my web accesses. This means that every query that I need to do has to pass the URI syntax checks. One of the sites that I am trying to access uses UNICODE as the url GET params encoding, i.e:</p> <p><a href="http://maya.tase.co.il/bursa/index.asp?http://maya.tase.co.il/bursa/index.asp?view=search&amp;company_group=147&amp;srh_txt=%u05E0%u05D9%u05D1&amp;arg_comp=&amp;srh_from=2009-06-01&amp;srh_until=2010-02-16&amp;srh_anaf=-1&amp;srh_event=9999&amp;is_urgent=0&amp;srh_company_press=" rel="nofollow noreferrer">http://maya.tase.co.il/bursa/index.asp?http://maya.tase.co.il/bursa/index.asp?view=search&amp;company_group=147&amp;srh_txt=%u05E0%u05D9%u05D1&amp;arg_comp=&amp;srh_from=2009-06-01&amp;srh_until=2010-02-16&amp;srh_anaf=-1&amp;srh_event=9999&amp;is_urgent=0&amp;srh_company_press=</a></p> <p>(the param "srh_txt=%u05E0%u05D9%u05D1" encodes srh_txt=ניב in UNICODE)</p> <p>The problem is that URI doesn't support UNICODE encoding(it only supports UTF-8) The really big issue here, is that this site expect it's params to be encoded in UNICODE, so any attempts to convert the url using String.format("<a href="http://...srh_txt=%s&amp;" rel="nofollow noreferrer">http://...srh_txt=%s&amp;</a>...",URLEncoder.encode( "ניב" , "UTF8")) results in a url which is legal and can be used to construct a URI but the site response to it with an error message, since it's not the encoding that it expects.</p> <p>by the way URL object can be created and even used to connect to the web site using the non converted url. Is there any way of creating URI in non UTF-8 encoding? Is there any way of working with apache httpclient 4 with regular URL(and not URI)?</p> <p>thanks, Niv</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload