---
title: "中文编码转Unicode"
author: "carrot"
date: "2008-08-03T11:16:56Z"
tags: []
slug: "unicode"
draft: false
lastmod: "2008-08-03T11:16:56Z"
id: 223586
url: "https://carrot.iteye.com/blog/223586"
---

格式   native2ascii  所要转码文件 转码后文件

例:native2ascii ApplicationResources\_zh.properties ApplicationResources\_zh\_CN.properties

转码形如:

index.heading=\\u6b22\\u8fce\\u4f7f\\u7528\\u5730\\u5740\\u672c!  
logon.title=\\u70b9\\u51fb\\u8fd9\\u91cc\\u8fdb\\u5165!

 

Unicode编码转中文  native2ascii -reverse -encoding utf8 所要转码文件 转码后文件

格式  native2ascii -reverse -encoding gb2312 所要转码文件 转码后文件

例:native2ascii  -reverse -encoding gb2312  ApplicationResources\_unicode.properties ApplicationResources\_cn.properties

转码形如:

index.heading=萝卜欢迎你!  
logon.title=哈哈!