Skip to content

Commit a0f3edf

Browse files
authored
Merge pull request #2 from 125m125/patch-2
Support UTF-8 characters in notifications
2 parents 1669b63 + 0e45014 commit a0f3edf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/xyz/pushpad/Notification.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ private JSONObject deliver(String reqBody) throws DeliveryException {
9999

100100
// Send request
101101
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
102-
wr.writeBytes(reqBody);
102+
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(wr, "UTF-8"));
103+
writer.write(reqBody);
104+
writer.close();
103105
wr.close();
104106

105107
// Get Response

0 commit comments

Comments
 (0)