projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altoslib: Use existing unicode Charset in AltosLink
[fw/altos]
/
altoslib
/
AltosLink.java
diff --git
a/altoslib/AltosLink.java
b/altoslib/AltosLink.java
index 8346d281f1e2a0be012f2b69fcef15fa302e04e8..97fa70625ce8d90aa5e1e84eb1f1b01b7c4ba8e2 100644
(file)
--- a/
altoslib/AltosLink.java
+++ b/
altoslib/AltosLink.java
@@
-251,13
+251,7
@@
public abstract class AltosLink implements Runnable {
public void add_bytes(byte[] bytes, int len) throws InterruptedException {
String line;
public void add_bytes(byte[] bytes, int len) throws InterruptedException {
String line;
- try {
- line = new String(bytes, 0, len, "UTF-8");
- } catch (UnsupportedEncodingException ue) {
- line = "";
- for (int i = 0; i < len; i++)
- line = line + bytes[i];
- }
+ line = new String(bytes, 0, len, AltosLib.unicode_set);
if (debug)
System.out.printf("\t\t\t\t\t%s\n", line);
add_string(line);
if (debug)
System.out.printf("\t\t\t\t\t%s\n", line);
add_string(line);