diff options
| author | Keith Packard <keithp@keithp.com> | 2014-02-03 00:26:42 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2014-02-03 00:31:57 -0800 | 
| commit | 0c2f28cbc1cb312d3bcc8951176d79f234a1af04 (patch) | |
| tree | d6a7056fe8a83e7be3d597cb0970fe53d5c9a826 | |
| parent | 7df221c42948cb42cf777b899263c8ec9067bd55 (diff) | |
altoslib: Use existing unicode Charset in AltosLink
Instead of making AltosLink look up the unicode charset, just provide
it directly.
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rw-r--r-- | altoslib/AltosLink.java | 8 | 
1 files changed, 1 insertions, 7 deletions
| diff --git a/altoslib/AltosLink.java b/altoslib/AltosLink.java index 8346d281..97fa7062 100644 --- 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; -		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); | 
