Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2021784
  • 博文数量: 413
  • 博客积分: 10926
  • 博客等级: 上将
  • 技术积分: 3862
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-09 18:14
文章分类

全部博文(413)

文章存档

2015年(5)

2014年(1)

2013年(5)

2012年(6)

2011年(138)

2010年(85)

2009年(42)

2008年(46)

2007年(26)

2006年(59)

分类: 嵌入式

2012-05-31 10:56:35

In your android project, if you use Chinese in .java directly (such as textView.setText("中文")), and then build the project within Android source code with commands:
$ cd $android_src_dir
$ . ./build/envsetup.sh
$ cd $your_android_project_dir
$ mm
the Chinese can't be shown correctly.
The reason is that the flag '-encoding assci' is applied when to build .java with javac in Android 2.3.
Solution:
Replace the flag with '-encoding utf-8'

阅读(803) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~