---
title: "字符集错误引起的问题"
author: "east_java"
date: "2009-11-20T21:31:13Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-11-20T21:31:13Z"
id: 521718
url: "https://japi.iteye.com/blog/521718"
---

如果字符集设置错误则会出现：

一是常见的乱码

二是com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'user\_name' at row 1

三是查询时出现字符集不匹配 如：http://japi.iteye.com/blog/521713