1

when django invoking java, why utf-8 chars outputing is not ok?

view story
linux-howto

http://stackoverflow.com – When I use django, I write a method can be invoked by http:// myhost/XXX/testIndex def testIndex(request): res = os.system('java -jar test.HelloWorld' > /tmp/log) ... ... and the HelloWorld java is as follows: public class HelloWorld { public static void main(String[] args) throws IOException { System.out.println("hello!"); System.out.println("你好!"); } When I access the http:// myhost/XXX/testIndex, the result is when I open the /tmp/log file, the UTF-8 chars is not correct! like this hello! ??! What happened ? BTW, I am under linux centOS (HowTos)