jira-importer opened a new issue, #853:
URL: https://github.com/apache/httpcomponents-core/issues/853

   **[Christopher G. Stach 
II](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cgs)** opened 
**[HTTPCORE-299](https://issues.apache.org/jira/browse/HTTPCORE-299?redirect=false)**
 and commented
   
   Other than relying upon toString for functional code being a bad idea, the 
java.nio.charset.Charset API contains the name() method for retrieving the 
canonical name (ContentType.java:118). At least on Android, Charset.toString() 
returns the class name and the canonical name. This makes the new API from 
[HTTPCORE-297](https://issues.apache.org/jira/browse/HTTPCORE-297) somewhat 
broken, as you'll still need to rely on the recently deprecated StringEntity 
API, like the following, in order to get a header that works:
   
   new StringEntity(str, contentType.getMimeType(), 
contentType.getCharset().name())
   
   
   ---
   
   **Affects:** 4.2
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to