Title: getBytes encoding should be explicit · Issue #105 · microsoftgraph/msgraph-sdk-java · GitHub
Open Graph Title: getBytes encoding should be explicit · Issue #105 · microsoftgraph/msgraph-sdk-java
X Title: getBytes encoding should be explicit · Issue #105 · microsoftgraph/msgraph-sdk-java
Description: 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 ...
Open Graph Description: 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 whate...
X Description: 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 whate...
Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-java/issues/105
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"getBytes encoding should be explicit","articleBody":"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`.\r\n\r\nA quick grep showed these:\r\n\r\n```\r\n./src/main/java/com/microsoft/graph/http/DefaultHttpProvider.java: bytesToWrite = serializeObject.getBytes();\r\n./src/main/java/com/microsoft/graph/http/DefaultHttpProvider.java: InputStream in = new ByteArrayInputStream(\"{}\".getBytes());\r\n./src/main/java/com/microsoft/graph/models/extensions/Multipart.java:\t\taddPart(name, contentType, content.getBytes());\r\n./src/main/java/com/microsoft/graph/models/extensions/Multipart.java:\t\tout.write(partContent.getBytes());\r\n./src/main/java/com/microsoft/graph/models/extensions/Multipart.java:\t\tout.write(returnContent.getBytes());\r\n./src/main/java/com/microsoft/graph/models/extensions/Multipart.java:\t\tfinalStream.write(addEnding().getBytes());\r\n./src/test/java/com/microsoft/graph/http/MockConnection.java: return new ByteArrayInputStream(mData.getJsonResponse().getBytes());\r\n./src/test/java/com/microsoft/graph/functional/SharePointTests.java:// String url = \"u!\" + Base64.getUrlEncoder().encodeToString(testSite.webUrl.getBytes());\r\n./src/test/java/com/microsoft/graph/functional/OneNoteTests.java: byte[] pageStream = content.getBytes();\r\n```\r\n","author":{"url":"https://github.com/davidmoten","@type":"Person","name":"davidmoten"},"datePublished":"2018-07-24T07:20:45Z","url":"https://github.com/microsoftgraph/msgraph-sdk-java/issues/105"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1ce40f3f-18aa-d668-979a-c56072aad9a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E4D0:33B184:D1B9D6:1160DB0:6B050550 |
| html-safe-nonce | 70dfa619d3bad6fefa781ab21884ff6021bd5888ce895e6ea6f25279831766ed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEQwOjMzQjE4NDpEMUI5RDY6MTE2MERCMDo2QjA1MDU1MCIsInZpc2l0b3JfaWQiOiI0OTMyMzA2NDk3MTAwMzgzNTY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c617d3edab7082310744c0ed94055d10c6c29bdc8b5269af71bfd39d04f89e61 |
| hovercard-subject-tag | issue:343914302 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoftgraph/msgraph-sdk-java/105/issue_layout |
| twitter:image | https://opengraph.githubassets.com/159bfe6ed30b6e2be19df646901a96b868e108e12990d45172d2cda746232811/microsoftgraph/msgraph-sdk-java/issues/105 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/159bfe6ed30b6e2be19df646901a96b868e108e12990d45172d2cda746232811/microsoftgraph/msgraph-sdk-java/issues/105 |
| og:image:alt | 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 whate... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | davidmoten |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoftgraph/msgraph-sdk-java git https://github.com/microsoftgraph/msgraph-sdk-java.git |
| octolytics-dimension-user_id | 17304259 |
| octolytics-dimension-user_login | microsoftgraph |
| octolytics-dimension-repository_id | 103300409 |
| octolytics-dimension-repository_nwo | microsoftgraph/msgraph-sdk-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 103300409 |
| octolytics-dimension-repository_network_root_nwo | microsoftgraph/msgraph-sdk-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width