在后台对字符串进行转码

红色部分为要转换的字符串。

String a = new String(projectSchedule.getCommentDm().getBytes("ISO-8859-1"),"utf-8")

原理是String构造方法,查看具体的api。

前台字符集编码为iso-8859-1,传到后台用utf-8进行转码

原文地址:https://www.cnblogs.com/zhenmingliu/p/2343246.html