---
title: "struts2-dojo-plugin时间控件乱码解决"
author: "Java_Fan"
date: "2013-11-14T18:51:00Z"
tags: []
slug: "struts2-dojo-plugin"
draft: false
lastmod: "2014-04-19T19:49:02Z"
id: 2049755
url: "https://java-fan20071214154811.iteye.com/blog/2049755"
---

公司新系统的某些页面依旧采用了dojo的时间控件，但是这个控件存在乱码问题----从九月份到十二月份显示乱码。究其原因，是因为struts2-dojo-plugin-2.3.15.1.jar

的\\org\\apache\\struts2\\static\\dojo\\nls目录下的两个js文件（dojo\_zh.js和dojo\_zh-cn.js）保存时字符集编码没有采用utf-8，因此我们将这个jar包解压，然后用UE打开前面提到的两个js文件，将其中的中文乱码修改正确，然后保存时选择编码格式为utf-8即可。再以winrar的方式打开struts2-dojo-plugin-2.3.15.1.jar ，选择进入\\org\\apache\\struts2\\static\\dojo\\nls目录，然后将修改后保存为utf-8格式的两个js文件托放进去覆盖掉原来的文件即可。