天天看點

中文亂碼解決方案

在web應用中,經常出現中文亂碼問題:

1.中文顯示不出,亂碼

String str = new String(“原字元串”.getBytes("ISO-8859-1"),"UTF-8");

String "原字元串" = str;

2.中文顯示為問号

繼續閱讀