🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #19006

Re: �������

#19006
From: go ahead
Date: Tue, 13 Jan 2004 10:51
33 lines
2742 bytes
������һ���ϴ����صĶ�����
�ҵ�fileencoding��GBK
response.setHeader("Content-Disposition",
"attachment; filename=����.txt");
���ر���ʱ�ļ�����ʾΪ����
��������ʲôԭ��
���ڿ���̨�������ȷ��
��utf8ת���ļ�����ʾ�����utf8�����ֽ��룬�ļ���������
����̫�࣬���Բ�����utf8��
��λ�����æ������һ����Ҳû���������������

�� �� desertwolf (��������) �Ĵ������ᵽ: ��
: 1.ִ���������System.getProperties().list(System.out);
: �鿴��ϵͳuser.language,file.encoding��ʲô.
: 2.�ҵ�file.encoding��GBK,���Ծ���
: System.out.println(new String("����".getBytes("GBK"),"GB2312"));
: 3.Ҳ����˵,ϵͳĬ�ϵľ���GBK,���ô�ISO8859-1ת����.
: 4.ԭ��:���ܸ�jdk�İ汾�й�,��classpath��,��sun.io.CharToByteDoubleByte.class
: ��,ϵͳĬ�Ͼ���GBK,ȥ�������,��Ĭ�Ϸ�ʽΪISO8859-1,���ʱ��,���
: System.out.println(new String("����".getBytes("ISO8859-1"),"GBK"));
: ��Ӧ����ʾ������.
: �� �� OMEGA (go ahead) �Ĵ������ᵽ: ��
: .................������ʡ�ԣ�

--
���������õ�ʱ������������ʱ��
�����ǻ۵���ͷ��������������ͷ��
����������ʱ�ڣ����ǻ��ɵ�ʱ�ڣ�
���ǹ����ļ��ڣ����Ǻڰ��ļ��ڣ�
����ϣ��Ĵ��죬����ʧ��Ķ��죻
����ȫ����ֱ�����ã�����ȫ����ֱ���෴�ķ���...
�� ��Դ:���Ұ��Ͽ�վ bbs.nankai.edu.cn��[FROM: 218.246.111.137] 
Technical Details
Message-ID: <4AFDca$AGQ@bbs.nankai.edu.cn>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.happynet.org!NanKai

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,9dfe8f68eec0e519
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2004-01-13 02:52:13 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.happynet.org!NanKai
From: OMEGA.bbs@bbs.nankai.edu.cn (go ahead)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: �������
Date: 13 Jan 2004 10:51:03 GMT
Organization: �Ұ��Ͽ�վ
Message-ID: <4AFDca$AGQ@bbs.nankai.edu.cn>
X-Filename: Java/M.1073990724.A
Lines: 33