Community
Participate
Working Groups
Build Identifier: HttpClient gets http content in its default encoding - ISO-8859-1. If page content contains do not ASCII symbols, they transform to unreadable symbols sequences, for example: По просьбам читателей. I made small patch - add in method createAndPrepareHttpMethod(...) of class RestClientService folows string: httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, DEFAULT_HTTP_CONTENT_CHARSET); DEFAULT_HTTP_CONTENT_CHARSET is java constant: protected final static String DEFAULT_HTTP_CONTENT_CHARSET = "UTF-8"; //$NON-NLS-1$ Reproducible: Always
Created attachment 168644 [details] patch, that fixed this bug
Hi Pavel, I can apply this patch, but would like to ask one question To your knowledge, is there any possibility of regression (breaking something else) by applying this patch. If so, what?
Thanks, Scott I think this patch does not breake anything. If ECF REST client is trying to get data from URL with content by ASCII symbols only - it will get correcting content. This one just set correct behavior for not ASCII content.
Ok Pavel. Thanks. One thing to point out about this...it is possible for RestClientService subclasses to override createAndPrepareHttpMethod and set the options for the HttpMethod as desired. I've applied patch, tested, and released to HEAD. Thanks for the report and patch, Pavel. Resolving as fixed.
Thanks, Scott! I think this is really will help for not english-language users.