---
title: "native2ascii命令"
author: "bd2007"
date: "2011-08-03T15:59:29Z"
tags: []
categories: ["Web前端"]
slug: "native2ascii"
draft: false
lastmod: "2011-08-03T15:59:29Z"
id: 1139203
url: "https://bd2007.iteye.com/blog/1139203"
---

native2ascii 工具可以将带有本机编码字符（非拉丁 1 和非单一码字符）的文件转换成带有unicode编码字符的文件。
1.找到native2ascii工具
开始-搜索程序和文件-windows powershell 
2.使用native2ascil命令，举例说明：
 假设需要转化的属性文件为：d:\src\resources.properties（含有中文字符） ，转化后的属性文件为：d:\classes\resources.properties（中文字符统一转化为unicode） 
那么使用如下命令 　java_home\bin\native2ascii -encoding gbk d:\src\resources.properties d:\classes\resources.properties