Small changes to detail pages and change tellstick plugin to write in UTF-8
Former-commit-id: 90320b2bd13c134c0e3ec447759443af3303de42
This commit is contained in:
parent
b1464d9508
commit
ff9709b6d2
4 changed files with 23 additions and 7 deletions
|
|
@ -31,6 +31,7 @@ import zutil.log.OutputStreamLogger;
|
|||
import zutil.struct.TimedHashSet;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
|
@ -171,8 +172,9 @@ public class TellstickSerialComm implements Runnable, HalSensorController, HalEv
|
|||
}
|
||||
public void write(String data) {
|
||||
try {
|
||||
for(int i=0; i<data.length();i++)
|
||||
out.write(0xFF & data.charAt(i));
|
||||
//for(int i=0; i<data.length();i++)
|
||||
// out.write(0xFF & data.charAt(i));
|
||||
out.write(data.getBytes(Charset.forName("UTF-8")));
|
||||
out.write('\n');
|
||||
out.flush();
|
||||
} catch (IOException e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue