Skip to content

Commit

Permalink
Update comment regarding ASCII
Browse files Browse the repository at this point in the history
  • Loading branch information
belugabehr committed Oct 6, 2024
1 parent d9c1671 commit 1671a34
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public void writeString(String string) throws IOException {
for (int i = 0; onlyAscii && (i < stringLength); i++) {
/*
* The char data type is a single 16-bit Unicode character (UTF-16). ASCII, is a
* 7-bit character encoding. Therefore, if the 8-bit is set than it cannot be
* ASCII. If it is ASCII, it is safe to trim to byte.
* 7-bit character encoding. Therefore, if the value is larger than 127, it
* cannot be ASCII. If it is ASCII, it is safe to trim to byte.
*/
final char c = string.charAt(i);
if (c >= 0x80) {
Expand Down

0 comments on commit 1671a34

Please sign in to comment.