---
title: "Tomcat的中文乱码"
author: "freesky1002"
date: "2007-11-23T10:56:46Z"
tags: []
slug: "tomcat"
draft: false
lastmod: "2007-11-23T10:56:46Z"
id: 142977
url: "https://freesky1002.iteye.com/blog/142977"
---

A.request.setCharacterEncoding("gb2312");

B.type = new String(type.getBytes("ISO8859-1"), "GB2312");

C.在Tomcat的配置文件Server.xml中的Connector标签中加入“URIEncoding=UTF-8”属性;

D.conf\\web.xml 指定多个Encoding参数;

E.编写一个filter，处理Post提交的编码问题;