我有与 here 相同的问题.
我使用 primefaces 2.2 jsf 实现。我已经尝试了所有方法,但没有任何作用。还有其他解决方案吗?
当我尝试 new String (s.getBytes ("iso-8859-1"), "UTF-8");
,
我怎么知道输入编码?
最佳答案
String fileName=new String(event.getFile()
.getFileName()
.getBytes(Charset.defaultCharset()),"UTF-8").toUpperCase(locale);
关于java - 使用 primefaces 上传文件时出现编码问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12037326/