Extending discussion in #95 there are many places in the project source where platform dependent character encoding is used via a call to getBytes() instead of for instance getBytes(utf8) (or whatever is appropriate). All of these calls should use an explicit Charset.
A quick grep showed these:
./src/main/java/com/microsoft/graph/http/DefaultHttpProvider.java: bytesToWrite = serializeObject.getBytes();
./src/main/java/com/microsoft/graph/http/DefaultHttpProvider.java: InputStream in = new ByteArrayInputStream("{}".getBytes());
./src/main/java/com/microsoft/graph/models/extensions/Multipart.java: addPart(name, contentType, content.getBytes());
./src/main/java/com/microsoft/graph/models/extensions/Multipart.java: out.write(partContent.getBytes());
./src/main/java/com/microsoft/graph/models/extensions/Multipart.java: out.write(returnContent.getBytes());
./src/main/java/com/microsoft/graph/models/extensions/Multipart.java: finalStream.write(addEnding().getBytes());
./src/test/java/com/microsoft/graph/http/MockConnection.java: return new ByteArrayInputStream(mData.getJsonResponse().getBytes());
./src/test/java/com/microsoft/graph/functional/SharePointTests.java:// String url = "u!" + Base64.getUrlEncoder().encodeToString(testSite.webUrl.getBytes());
./src/test/java/com/microsoft/graph/functional/OneNoteTests.java: byte[] pageStream = content.getBytes();
Extending discussion in #95 there are many places in the project source where platform dependent character encoding is used via a call to
getBytes()instead of for instancegetBytes(utf8)(or whatever is appropriate). All of these calls should use an explicitCharset.A quick grep showed these: