We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cc0bca commit 6c7fdcaCopy full SHA for 6c7fdca
java/src/main/java/com/genexus/internet/HttpClientJavaLib.java
@@ -767,11 +767,12 @@ public String getString() {
767
return "";
768
try {
769
this.setEntity();
770
- Charset charset = ContentType.getOrDefault(response.getEntity()).getCharset();
+ ContentType contentType = ContentType.getOrDefault(response.getEntity());
771
+ Charset charset = contentType.getCharset() != null
772
+ ? contentType.getCharset()
773
+ : StandardCharsets.UTF_8;
774
+
775
String res = EntityUtils.toString(entity, charset);
- if (res.matches(".*[Ã-ÿ].*")) {
- res = EntityUtils.toString(entity, StandardCharsets.UTF_8);
- }
776
eof = true;
777
return res;
778
} catch (IOException e) {
0 commit comments