---
title: "native2ascii_use method"
author: "svft"
date: "2011-11-15T14:50:27Z"
tags: []
categories: ["编程语言"]
slug: "native2ascii-use-method"
draft: false
lastmod: "2011-11-15T14:50:27Z"
id: 1260233
url: "https://svft.iteye.com/blog/1260233"
---

native2ascii 工具将带有本机编码字符（非拉丁 1 和非单一码字符）的文件转换成带有Unicode编码字符的文件。 假设需要转化的属性文件为：D:\src\resources.properties（含有中文字符） ，转化后的属性文件为：D:\classes\resources.properties（中文字符统一转化为Unicode） 
那么使用如下命令 

　　JAVA_HOME\bin\native2ascii -encoding GBK D:\src\resources.properties D:\classes\resources.properties