Skip to content

Commit ff10d7b

Browse files
authored
Merge pull request #64 from versionone/D-17720-specify-encoding
D 17720 specify encoding in V1Connector IO streams
2 parents 45e1ccb + a0512c0 commit ff10d7b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.versionone</groupId>
66
<artifactId>VersionOne.SDK.Java.APIClient</artifactId>
7-
<version>16.1.2</version>
7+
<version>16.1.3</version>
88
<packaging>jar</packaging>
99

1010
<name>VersionOne.SDK.Java.APIClient</name>

src/main/java/com/versionone/apiclient/V1Connector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ protected Reader getData(String path) throws ConnectionException {
317317

318318
if (errorCode == HttpStatus.SC_OK) {
319319
try {
320-
data = new InputStreamReader(entity.getContent());
320+
data = new InputStreamReader(entity.getContent(), StandardCharsets.UTF_8);
321321
} catch (IllegalStateException e) {
322322
e.printStackTrace();
323323
} catch (IOException e) {
@@ -497,7 +497,7 @@ public Reader sendData(String key, Object data, String contentType) {
497497

498498
try {
499499
httpResponse = httpclient.execute(httpPost);
500-
resultStream = new InputStreamReader(httpResponse.getEntity().getContent());
500+
resultStream = new InputStreamReader(httpResponse.getEntity().getContent(), StandardCharsets.UTF_8);
501501
} catch (IOException ex) {
502502
int code;
503503
try {

0 commit comments

Comments
 (0)