org.restlet.ext.freemarker.TemplateRepresentation 中文乱码
Representation r = new ClientResource(
LocalReference.createFileReference(templatedir
+ Constant.BookTemplate)).get();
TemplateRepresentation tr = new TemplateRepresentation(r, map,
MediaType.TEXT_HTML);
tr.setCharacterSet(CharacterSet.UTF_8);
return tr;
前台关于编码的地方有:
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
结果就出现了中文乱码,求解决!!!
wwssxx
10 years, 6 months ago