mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Convert to and from UTF-8 without catching impossible exceptions.
All JVMs must support UTF-8 encoding.
This commit is contained in:
@@ -307,6 +307,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
||||
for(int i = 0; i < b.length; i++) {
|
||||
line[lineLen] = b[i];
|
||||
if(b[i] == '\n') {
|
||||
// FIXME: Use CharsetDecoder to catch invalid ASCII
|
||||
String s = new String(line, 0, lineLen, "US-ASCII").trim();
|
||||
lineLen = 0;
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Modem status: " + s);
|
||||
|
||||
Reference in New Issue
Block a user