String nonAlignOutput = "非对齐测试中文输出";
byte[] nonAlignInput = nonAlignOutput.getBytes(StringPool.UTF8);针对第二条语句,myeclipse报错:String literal is not properly closed by a double-quote小弟才疏学浅,没看出来有啥错,求指教

解决方案 »

  1.   

    StringPool 是?挺有意思的,,
      

  2.   

    String nonAlignOutput = "非对齐测试中文输出";
    try {
    byte[] nonAlignInput = nonAlignOutput.getBytes("utf-8");
    } catch (UnsupportedEncodingException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
      

  3.   

    原先是GBK编码错误,改成把编程环境改成UTF-8后修复了,但是莫名奇妙地出现这个错误,汗
      

  4.   

    编码问题,将中文在UTF-8下输入