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 33b92fb commit ee27aebCopy full SHA for ee27aeb
java/src/main/java/com/genexus/internet/HttpClientJavaLib.java
@@ -742,11 +742,12 @@ public String getString() {
742
return "";
743
try {
744
this.setEntity();
745
- Charset charset = ContentType.getOrDefault(response.getEntity()).getCharset();
+ ContentType contentType = ContentType.getOrDefault(response.getEntity());
746
+ Charset charset = contentType.getCharset() != null
747
+ ? contentType.getCharset()
748
+ : StandardCharsets.UTF_8;
749
+
750
String res = EntityUtils.toString(entity, charset);
- if (res.matches(".*[Ã-ÿ].*")) {
- res = EntityUtils.toString(entity, StandardCharsets.UTF_8);
- }
751
eof = true;
752
return res;
753
} catch (IOException e) {
0 commit comments