用不要用DataOutputStream,用PrintWriter试试~
PrintWriter out = new PrintWriter(new FileOutputStream("data.log", true));
out.println(s);

解决方案 »

  1.   

    对的,用Writer,因为Writer支持Unicode,写中文也不应有乱码。
    PrintWriter out
       = new PrintWriter(new BufferedWriter(new FileWriter("foo.out")));
      

  2.   

    系统不是默认的英文嘛,那看看gb2312
    怎么样?
    aResponse.setContentType( "text/html;charset=GB2312" );
    PrintWriter aOut = aResponse.getWriter(); 
    aOut.println(s);