From: Jeff A. <ja...@fa...> - 2014-12-11 08:14:48
|
That's good news. You should probably supply the character set (or its name) to String.getBytes, unless you can guarantee that the default matches the coding you have declared. Beware also setIn(Reader), setOut(Writer), setErr(Writer). I think that these ignore encoding (to be investigated), and that the InputStream and OutputStream equivalents, where you take control of the encoding yourself, would work better for you at present. Jeff Allen On 11/12/2014 05:23, yaq...@gm... wrote: > Dear Jeff, > > Thanks for your patient explanation. Following your advoice, I can > solve the problem by using under code: > > PythonInterpreter interp = new PythonInterpreter(); > String code = textArea.getText(); > interp.execfile(new ByteArrayInputStream(code.getBytes())); > [snip] |