📄 iphone的中文问题解决.htm
字号:
}
.dig:hover {
BORDER-RIGHT: #e6e6b3 1px solid; BORDER-TOP: #e6e6b3 2px solid; BORDER-LEFT: #e6e6b3 2px solid; BORDER-BOTTOM: #e6e6b3 1px solid; TEXT-DECORATION: none
}
.menu A.a6:hover {
BACKGROUND: #f0f0f0; COLOR: #00f; TEXT-DECORATION: underline
}
.user-pic {
MARGIN: 0px auto 0.5em
}
.user-pic TABLE {
BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none
}
.user-pic IMG.pic {
BORDER-RIGHT: #daebcd 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #daebcd 1px solid; PADDING-LEFT: 3px; BACKGROUND: #f3f8ef; PADDING-BOTTOM: 3px; MARGIN: 0px 0px 0.3em; BORDER-LEFT: #daebcd 1px solid; PADDING-TOP: 3px; BORDER-BOTTOM: #daebcd 1px solid
}
.user-info {
MARGIN-TOP: -1em; MARGIN-LEFT: -1.5em; LINE-HEIGHT: 160%; POSITION: absolute
}
.user-infoWrap {
BORDER-RIGHT: #004c7d 1px solid; PADDING-RIGHT: 1em; BORDER-TOP: #a6cbe7 1px solid; DISPLAY: block; PADDING-LEFT: 1em; BACKGROUND: #fff; PADDING-BOTTOM: 0.5em; MARGIN-LEFT: 20px; BORDER-LEFT: #a6cbe7 1px solid; PADDING-TOP: 0.5em; BORDER-BOTTOM: #004c7d 1px solid
}
.user-info .co {
MARGIN-TOP: 2em; BACKGROUND: url(images/wind/user-info-co.gif); MARGIN-LEFT: -1.8em; WIDTH: 10px; POSITION: absolute; HEIGHT: 20px
}
.small {
FONT-SIZE: 12px
}
.middle {
FONT-SIZE: 14px
}
.big {
FONT-SIZE: 18px
}
</STYLE>
<DIV class=t3>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
<TBODY>
<TR>
<TD class=b><IMG src="iphone的中文问题解决.files/home.gif" align=absMiddle> <A
href="http://www.cocoachina.com/bbs/index.php">Cocoa China 开发讨论区</A> » <A
href="http://www.cocoachina.com/bbs/thread.php?fid=6">iPhone/iPod
Touch开发一般讨论区</A> » <A
href="http://www.cocoachina.com/bbs/htm_data/6/0809/562.html">分享经验:iphone的中文问题解决</A>
<A
href="http://www.cocoachina.com/bbs/read.php?fid=6&tid=562&toread=1">(转到动态网页)</A></TD></TR></TBODY></TABLE></DIV>
<DIV class=t3>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
<TBODY>
<TR>
<TD align=left></TD>
<TD align=right><A
href="http://www.cocoachina.com/bbs/post.php?action=reply&fid=6&tid=562"><IMG
src="iphone的中文问题解决.files/reply.png"></A> <A
onmouseover="read.open('menu_post','td_post','4');"
href="http://www.cocoachina.com/bbs/post.php?fid=6"><IMG id=td_post
src="iphone的中文问题解决.files/post.png"></A> </TD></TR></TBODY></TABLE></DIV>
<DIV class="menu tac f14" id=menu_post style="DISPLAY: none">
<UL style="WIDTH: 100px">
<LI><A href="http://www.cocoachina.com/bbs/post.php?fid=6">新 帖</A>
<LI><A href="http://www.cocoachina.com/bbs/post.php?fid=6&special=1">投
票</A> </LI></UL></DIV>
<DIV class=t style="BORDER-BOTTOM-WIDTH: 0px; MARGIN-BOTTOM: 0px">
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center>
<TBODY>
<TR>
<TD class=h><B>本页主题:</B> 分享经验:iphone的中文问题解决</TD>
<TD class=h style="TEXT-ALIGN: right"><SPAN><A
onclick="Addtoie('http://www.cocoachina.com/bbs/read.php?fid=6&tid=562','Cocoa China 开发讨论区--分享经验:iphone的中文问题解决')"
href="http://www.cocoachina.com/bbs/#">加为IE收藏</A> | <A id=favor
style="CURSOR: pointer"
onclick="sendmsg('pw_ajax.php?action=favor&','tid=562',this.id)">收藏主题</A>
| <A
href="http://www.cocoachina.com/bbs/job.php?action=previous&fid=6&tid=562&fpage=&goto=previous">上一主题</A>
| <A
href="http://www.cocoachina.com/bbs/job.php?action=previous&fid=6&tid=562&fpage=&goto=next">下一主题</A></SPAN>
</TD></TR>
<TR>
<TD></TD></TR>
<TR class=tr2>
<TH class=tar colSpan=2><BR></TH></TR>
<TR>
<TD></TD></TR></TBODY></TABLE></DIV>
<DIV class="t t2" style="BORDER-TOP-WIDTH: 0px">
<TABLE style="BORDER-TOP-WIDTH: 0px; TABLE-LAYOUT: fixed" cellSpacing=0
cellPadding=0 width="100%">
<TBODY>
<TR class=tr1>
<TH class=r_two style="WIDTH: 20%" rowSpan=2><B>yakie</B>
<DIV style="MARGIN: 0.3em 0px 0.4em 0.2em"></DIV>
<DIV class=user-pic>
<TABLE
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px">
<TBODY>
<TR>
<TD width=1><A
onmouseover="mt=setTimeout('read.open(\'showface_0\',\'sf_0\',\'4\');',700);"
style="CURSOR: pointer"
onmouseout=clearTimeout(mt);read.close();><IMG class=pic
src="iphone的中文问题解决.files/none.gif" border=0></A> </TD>
<TD style="VERTICAL-ALIGN: top"><SPAN
id=sf_0></SPAN></TD></TR></TBODY></TABLE></DIV>级别: <FONT
color=#555555>骑士</FONT><BR><IMG style="MARGIN: 0.2em 0px 0.6em"
src="iphone的中文问题解决.files/10.gif"><BR><SPAN class=user-info id=showface_0
style="DISPLAY: none"><SPAN class=user-infoWrap><SPAN class=co></SPAN><A
href="http://www.cocoachina.com/bbs/profile.php?action=show&uid=147"><IMG
title=查看作者资料 src="iphone的中文问题解决.files/profile.gif"></A> <IMG title=发送短消息
style="CURSOR: pointer"
onclick="sendmsg('pw_ajax.php','action=msg&touid=147','sf_0')"
src="iphone的中文问题解决.files/message.gif"><IMG title=加为好友
style="CURSOR: pointer" onclick="addfriend('147')"
src="iphone的中文问题解决.files/friends.gif"> <IMG title=对该用户使用道具
style="CURSOR: pointer"
onclick="sendmsg('pw_ajax.php','action=usertool&uid=147','sf_0')"
src="iphone的中文问题解决.files/magic.gif"> <BR>精华: <A class="s4 f9"
href="http://www.cocoachina.com/bbs/search.php?authorid=147&digest=1"
target=_blank>1</A> <BR>发帖: <SPAN class="s1 f9">229</SPAN><BR>威望: <SPAN
class="s2 f9">251 点</SPAN><BR>可可豆: <SPAN class="s3 f9">603
CB</SPAN><BR>贡献值: <SPAN class="s1 f9">11
点</SPAN><BR>iChat:<BR>GTalk:<BR>在线时间:42(小时)<BR><SPAN
class=gray>注册时间:2008-06-13<BR>最后登录:2008-10-16 </SPAN></SPAN></SPAN></TH>
<TH class=r_one id=td_tpc
style="BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 15px; PADDING-LEFT: 15px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; WIDTH: 80%; PADDING-TOP: 5px; BORDER-RIGHT-WIDTH: 0px"
vAlign=top height="100%">
<DIV class=tiptop><SPAN class=fr><A style="CURSOR: pointer"
onclick="fontsize('small','tpc')">小</A> <A style="CURSOR: pointer"
onclick="fontsize('middle','tpc')">中</A> <A style="CURSOR: pointer"
onclick="fontsize('big','tpc')">大</A></SPAN> <SPAN class=fl
style="WHITE-SPACE: nowrap"><A id=quote_tpc title=引用回复这个帖子
href="http://www.cocoachina.com/bbs/post.php?action=quote&fid=6&tid=562&pid=tpc&article=0">引用</A>
<A id=recommend_tpc title=推荐此帖
href="http://www.cocoachina.com/bbs/operate.php?action=recommend&tid=562">推荐</A>
<A
href="http://www.cocoachina.com/bbs/post.php?action=modify&fid=6&tid=562&pid=tpc&article=0">编辑</A>
</SPAN>
<DIV class=c></DIV></DIV>
<H1 class=fl id=subject_tpc> 分享经验:iphone的中文问题解决</H1>
<DIV class=c id=p_tpc></DIV>
<DIV class=tpc_content
id=read_tpc>从上次的讨论中,有个dx分享了他的得到系统设置语言的方法,如下<BR>NSUserDefaults* defs =
[NSUserDefaults
standardUserDefaults];<BR> NSArray*
languages = [defs
objectForKey:@"AppleLanguages"];<BR> NSString*
preferredLang = [languages
objectAtIndex:0];<BR>设置English,简体中文,繁体中文分别得到:en,zh-Hans,zh-Hant</DIV></TH></TR>
<TR class="tr1 r_one">
<TH
style="BORDER-TOP-WIDTH: 0px; PADDING-LEFT: 15px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: bottom; BORDER-RIGHT-WIDTH: 0px">
<DIV class=c id=w_tpc></DIV>
<DIV class=tipad><SPAN style="FLOAT: right"><A title=顶端
href="javascript:scroll(0,0)">顶端</A> </SPAN><SPAN class=gray>Posted:
2008-09-19 10:49 | From:广东省深圳市福田区 </SPAN><SPAN><A class=s3 title=回复此楼
style="CURSOR: pointer" onclick="postreply('回 楼主(yakie) 的帖子');">[楼
主]</A></SPAN> </DIV></TH></TR></TBODY></TABLE></DIV>
<DIV class="t t2">
<TABLE style="BORDER-TOP-WIDTH: 0px; TABLE-LAYOUT: fixed" cellSpacing=0
cellPadding=0 width="100%">
<TBODY>
<TR class=tr1>
<TH class=r_two style="WIDTH: 20%" rowSpan=2><B>yakie</B>
<DIV style="MARGIN: 0.3em 0px 0.4em 0.2em"></DIV>
<DIV class=user-pic>
<TABLE
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px">
<TBODY>
<TR>
<TD width=1><A
onmouseover="mt=setTimeout('read.open(\'showface_1\',\'sf_1\',\'4\');',700);"
style="CURSOR: pointer"
onmouseout=clearTimeout(mt);read.close();><IMG class=pic
src="iphone的中文问题解决.files/none.gif" border=0></A> </TD>
<TD style="VERTICAL-ALIGN: top"><SPAN
id=sf_1></SPAN></TD></TR></TBODY></TABLE></DIV>级别: <FONT
color=#555555>骑士</FONT><BR><IMG style="MARGIN: 0.2em 0px 0.6em"
src="iphone的中文问题解决.files/10.gif"><BR><SPAN class=user-info id=showface_1
style="DISPLAY: none"><SPAN class=user-infoWrap><SPAN class=co></SPAN><A
href="http://www.cocoachina.com/bbs/profile.php?action=show&uid=147"><IMG
title=查看作者资料 src="iphone的中文问题解决.files/profile.gif"></A> <IMG title=发送短消息
style="CURSOR: pointer"
onclick="sendmsg('pw_ajax.php','action=msg&touid=147','sf_1')"
src="iphone的中文问题解决.files/message.gif"><IMG title=加为好友
style="CURSOR: pointer" onclick="addfriend('147')"
src="iphone的中文问题解决.files/friends.gif"> <IMG title=对该用户使用道具
style="CURSOR: pointer"
onclick="sendmsg('pw_ajax.php','action=usertool&uid=147','sf_1')"
src="iphone的中文问题解决.files/magic.gif"> <BR>精华: <A class="s4 f9"
href="http://www.cocoachina.com/bbs/search.php?authorid=147&digest=1"
target=_blank>1</A> <BR>发帖: <SPAN class="s1 f9">229</SPAN><BR>威望: <SPAN
class="s2 f9">251 点</SPAN><BR>可可豆: <SPAN class="s3 f9">603
CB</SPAN><BR>贡献值: <SPAN class="s1 f9">11
点</SPAN><BR>iChat:<BR>GTalk:<BR>在线时间:42(小时)<BR><SPAN
class=gray>注册时间:2008-06-13<BR>最后登录:2008-10-16 </SPAN></SPAN></SPAN></TH>
<TH class=r_one id=td_2594
style="BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 15px; PADDING-LEFT: 15px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; WIDTH: 80%; PADDING-TOP: 5px; BORDER-RIGHT-WIDTH: 0px"
vAlign=top height="100%">
<DIV class=tiptop><SPAN class=fr><A style="CURSOR: pointer"
onclick="fontsize('small','2594')">小</A> <A style="CURSOR: pointer"
onclick="fontsize('middle','2594')">中</A> <A style="CURSOR: pointer"
onclick="fontsize('big','2594')">大</A></SPAN> <SPAN class=fl
style="WHITE-SPACE: nowrap"><A id=quote_2594 title=引用回复这个帖子
href="http://www.cocoachina.com/bbs/post.php?action=quote&fid=6&tid=562&pid=2594&article=1">引用</A>
<A id=recommend_2594 title=推荐此帖
href="http://www.cocoachina.com/bbs/operate.php?action=recommend&tid=562">推荐</A>
<A
href="http://www.cocoachina.com/bbs/post.php?action=modify&fid=6&tid=562&pid=2594&article=1">编辑</A>
</SPAN>
<DIV class=c></DIV></DIV>
<H1 class=fl id=subject_2594></H1>
<DIV class=c id=p_2594></DIV>
<DIV class=tpc_content
id=read_2594>有些程序通过网络或者其他得到的中文是简体,如何转换成繁体呢,我从java的基础上修改了一个类来实现,代码如下<BR>GBToBig5.h<BR><BR><SPAN
style="COLOR: #0000ff">#import <UIKit/UIKit.h><BR><BR><BR>@interface
GBToBig5 : NSObject {<BR> char
*b_gbTable;<BR> unsigned int
bytesRead;<BR> NSMutableData *_data;<BR>}<BR>-
(void)loadTableData;<BR>- (NSString *) gb2big5:(NSString
*)inStr;<BR>@end</SPAN><BR><BR>GBToBig5.m如下:<BR><BR><SPAN
style="COLOR: #0000ff">#import "GBToBig5.h"<BR><BR>NSStringEncoding
big5Encoding=0x80000A03;<BR>NSStringEncoding
big5Encoding_HK=0x80000A06;<BR>NSStringEncoding
gbEncoding=0x80000631;<BR><BR>@implementation
GBToBig5<BR> <BR> <BR>-
(GBToBig5 *)init{<BR> if(self=[super
init]){<BR> //memset(b_gbTable,
0 ,
sizeof(b_gbTable));<BR> [self
loadTableData];<BR> }<BR> return
self; <BR> }<BR>- (unsigned
char*) gbToBig5:(unsigned char *)Text
length:(NSInteger)len{<BR> @try{<BR> int
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -