---
title: "struts中国际化，中文转成ascii的命令使用方法"
author: "abeetle"
date: "2007-04-05T16:13:00Z"
tags: []
slug: "struts-ascii"
draft: false
lastmod: "2007-04-05T16:13:00Z"
id: 233867
url: "https://abeetle.iteye.com/blog/233867"
---

在Struts中要用到国际化，写了个英文属性文件，想不起中文的用什么命令了，所以现在写下来，以便日后查找

国际化的属性文件的默认位置： com.yourcompany.struts.ApplicationResources

用法：native2ascii \[-reverse] \[-encoding 编码] \[输入文件 \[输出文件]]

zn.txt是用中文写的，aa.properties是要输出的文件。命令如下：

native2ascii -encoding gb2312 c:\\zn.txt c:\\aa.properties