Article View: cn.bbs.comp.lang.java
Article #20065Re: ��������
From: javaphp
Date: Thu, 25 Dec 2003 00:59
Date: Thu, 25 Dec 2003 00:59
31 lines
2057 bytes
2057 bytes
new String(byte[], "UTF-8");
new String(byte[], "UTF-16");
--
���ѡ���ޣ���Ҹ�~Ŭ����Ǯ���ڡ��������⡷һ����д��:
>ASCII�ַ���ɵ�byte[]��ôת�����ַ�
>��new String(byte[], "ASCII");��
>��ʱ������ʱ����
>�����Unicode��ɵ�byte[]�أ����ݶ������ĵġ�
>��new String(byte[], "Unicode")ת����ȫ�ǿո�
>������ô��
>int size=byte[].size();
>byte[] b = new byte[1];
>StringBuffer sb = new StringBuffer();
>for(int i=0;i<size;i++)
>{
> b[0] = byte[i];
> sb.append(new String(b, "Unicode"));
>}
--
�ս����һ��վ�㣬������ͬ��Ȥ�����Ѽ��ˣ�
ÿ�ܶ����и��£������к���Ķ�����������أ�
��ӭ���٣�
http://www.javaphp.com/
Technical Details
Message-ID:
<9idkuv03jikmfplnrd8b2oi3g1cbkehq1d@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-05!sn-xit-08!supernews.com!newsfeed.news2me.com!newshosting.com!news-xfer2.atl.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.cn99.com!news.yaako.com!not-for-mailReferences:
<49lKdO$9iV@bbs.nankai.edu.cn>Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,6ddbfbc5aa97e9cb X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-12-24 16:58:28 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-05!sn-xit-08!supernews.com!newsfeed.news2me.com!newshosting.com!news-xfer2.atl.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.cn99.com!news.yaako.com!not-for-mail From: javaphp <javaphp@sohu.com> Newsgroups: cn.bbs.comp.lang.java Subject: Re: �������� Date: Thu, 25 Dec 2003 08:59:26 +0800 Organization: Bentium Ltd. (CN99) Lines: 31 Message-ID: <9idkuv03jikmfplnrd8b2oi3g1cbkehq1d@4ax.com> References: <49lKdO$9iV@bbs.nankai.edu.cn> Reply-To: javaphp@sohu.com NNTP-Posting-Host: 211.157.16.205 Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Trace: news.yaako.com 1072313883 6868 211.157.16.205 (25 Dec 2003 00:58:03 GMT) X-Complaints-To: usenet@news.yaako.com NNTP-Posting-Date: Thu, 25 Dec 2003 00:58:03 +0000 (UTC) X-Newsreader: Forte Agent 1.8/32.548