Skip to content

Commit 88e66f8

Browse files
committed
use the Java 1.7 version of Files.newBufferedWriter, not the Java 1.8 version
1 parent 3a54b04 commit 88e66f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/marklogic/client/impl/OkHttpServices.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
import java.io.Writer;
133133
import java.math.BigDecimal;
134134
import java.net.URLEncoder;
135+
import java.nio.charset.Charset;
135136
import java.nio.file.Files;
136137
import java.nio.file.Path;
137138
import java.security.cert.Certificate;
@@ -5223,7 +5224,7 @@ private <T> T getEntity(ResponseBody body, Class<T> as) {
52235224
if ( isBinary == true ) {
52245225
Files.write(path, body.bytes());
52255226
} else {
5226-
Writer out = Files.newBufferedWriter(path);
5227+
Writer out = Files.newBufferedWriter(path, Charset.forName("UTF-8"));
52275228
try {
52285229
out.write(body.string());
52295230
} finally {

0 commit comments

Comments
 (0)