⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manual_unicode.html

📁 aspupload
💻 HTML
字号:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Developer Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="KEYWORDS" content="ASP UPLOAD ASPUPLOAD PWS BLOB Personal Web Server IIS Internet Information Server ASP UPLOADING UPLOAD DEC ALPHA AlphaServer AspUpload Persits Software Persits Web ASP Active Server Pages Active Server Component Upload browser TYPE=FILE TYPE FILE Windows NT Web ACL ACE Access Control List Directory Listing Export Attribute FILE FREE RFC ie3 ie4 posting acceptor posting acceptor RFC1867 RFC-1867 1867 Component ENCTYPE multipart/form-data multipart SA-FileUp ActiveFile Database Multiple software artisans activefile vbscript activex jscript netscape internet explorer download downloading unique form limit size">
<meta name="KEYWORDS" content="ASP, UPLOAD, ASPUPLOAD, PWS, BLOB, Personal Web Server, IIS, Internet Information Server, ASP, UPLOADING, UPLOAD, DEC, ALPHA, AlphaServer, AspUpload, Persits Software, Persits, Web, ASP, Active Server Pages, Active Server Component, Upload, browser, TYPE=FILE, TYPE, FILE, Windows, NT, Web, ACL, ACE, Access Control List, Directory, Listing, Export, Attribute, FILE, FREE, RFC, ie3, ie4, posting acceptor, posting, acceptor, RFC1867, RFC-1867, 1867, Component, ENCTYPE, multipart/form-data, multipart, SA-FileUp, ActiveFile, Database, Multiple, software, artisans, activefile, vbscript, activex, jscript, netscape, internet, explorer, download, downloading, unique, form, limit, size">
<meta name="DESCRIPTION" content="AspUpload.com - the home of the most advanced upload solution for a Windows NT/ASP-based Web environment">
<TITLE>AspUpload.com - User Manual. Chapter 8</TITLE>
</HEAD>
<BODY BACKGROUND="bk.gif" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<BASEFONT FACE="Helvetica, Arial" SIZE=1>

<!-- Main Data table -->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="705">
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="160">
<FONT FACE="arial narrow" Size=2>
<B>
	<IMG SRC="spacer.gif" BORDER="0" HEIGHT="15"><BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="index.html">Home</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="whatsnew.html">What's New</A>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square_pressed.gif"> <A HREF="manual.html">User Manual</A>
	<BR>

	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_intro.html">1. Introduction</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_simple.html">2. Simple Uploads</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_memory.html">3. Memory Uploads</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_db.html">4. Database</A><BR>	
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_progress.html">5. Progress Bar</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_security.html">6. Security</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_image.html">7. Images</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small_pressed.gif"> 8. Unicode<BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_misc.html">9. Miscellaneous</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="sq.gif"><IMG SRC="square_small.gif"> <A HREF="manual_share.html">10. Hosting Issues</A><BR>

	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="objectreference.html">Object Reference</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="livedemo.html">Live Demos</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="support.html">Support</A>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="xupload.html">XUpload</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="jupload.html">JUpload</A><BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="aspjpeg.html">AspJpeg</A><BR>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="download.html">Download</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="purchase.html">Purchase</A>
	<P>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="clients.html">Clients</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="otherproducts.html">Other Products</A>
	<BR>
	<IMG SRC="sq.gif"><IMG SRC="square.gif"> <A HREF="contact.html">Contact Us</A>


	<FORM TARGET="_new" ACTION="http://support.persits.com/emails/signup.asp">
	<FONT FACE="Arial Narrow" SIZE="2" COLOR="#9C3131"><IMG SRC="sq.gif"><B>Newsletter Signup</B></FONT><BR>
	<IMG SRC="sq.gif"><INPUT TYPE="TEXT" NAME="email" SIZE="15" VALUE="e-mail address"></FORM>
</B>
</FONT>
</TD>
<TD VALIGN=TOP WIDTH=545 ALIGN="LEFT">
<!-- Right Column with data -->
<IMG SRC="sq.gif"><BR>
<IMG SRC="manual.gif">
<BR>
<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
</TABLE>
<P>	
	<FONT SIZE=2 FACE=ARIAL COLOR="#000000">
	
	<A HREF="manual_misc.html"><IMG BORDER="0" SRC="next.gif" ALIGN="RIGHT" ALT="Chapter 9: Miscellaneous Features"></A>
	<A HREF="manual_image.html"><IMG BORDER="0" SRC="previous.gif" ALIGN="RIGHT" ALT="Chapter 7: Image Handling"></A>
	
	<B><U><FONT SIZE="3" COLOR="#990000">Chapter 8. Unicode Support</FONT></U></B>
	<P>
	
	<B><FONT COLOR="#0000A0">What is Unicode</FONT></B>
	<BLOCKQUOTE>
	From MSDN: <I>"Unicode is a 16-bit, fixed-width character encoding standard 
	that encompasses virtually all of the characters commonly used on computers today. 
	This includes most of the world's written languages, plus publishing characters, 
	mathematical and technical symbols, and punctuation marks."</i>
	<P>
	From Unicode.org: <I>"Computers ... store letters and other characters by assigning 
	a number for each one. Before Unicode was invented, there were hundreds of different encoding systems 
	for assigning these numbers. No single encoding could contain enough characters...
	Unicode provides a unique number for every character, no matter what the platform, 
	no matter what the program, no matter what the language."</i>
	<P>
	For example, the basic Latin letter "A" has the code Hex 0041 (65),
	the Russian letter <IMG SRC="zh.gif" BORDER="0"> has the code Hex 0416 (1046),
	and the Chinese character <IMG SRC="ch.gif" BORDER="0"> has the code Hex 32A5 (12965).
	<P>
	For more information on Unicode, visit <A HREF="http://www.unicode.org">www.unicode.org</A>.

	</BLOCKQUOTE>
	<B><FONT COLOR="#0000A0">What is UTF-8</FONT></B>
	<BLOCKQUOTE>
	UTF-8 (Unicode Transformation Format, 8-bit encoding form) is 
	the recommended format to be used to send Unicode-based data across networks, in particular the Internet.	
	UTF-8 represents a Unicode value as a sequence of 1, 2, or 3 bytes.
	<P>
	Unicode characters in the range Hex 0000 to 007F are encoded simply 
	as bytes 00 to 7F. This means that files and strings which contain only 
	7-bit ASCII characters have the same encoding under both ASCII and UTF-8.
	Therefore, the Unicode 0041 ("A") in UTF-8 is Hex 41.
	<P>
	Unicode characters in the range Hex 0080 to 07FF
	are encoded as a sequence of two bytes: <B>110xxxxx 10xxxxxx</B> (The xxx bit positions
	are filled with the bits of the character code number in binary representation.)
	For example, the Unicode 0416 (<IMG SRC="zh.gif" BORDER="0">),
	or Binary 00000<B>100 00010110</B>, is encoded as 110<B>10000</B> 10<B>010110</B>,
	or Hex D0 96.
	<P>
	Unicode characters in the range Hex 0800 to FFFF are encoded
	as a sequence of three bytes: <B>1110xxxx 10xxxxxx 10xxxxxx</B>.
	For example the Unicode 32A5 (<IMG SRC="ch.gif" BORDER="0">) is
	encoded as Hex E3 8A A5.

	</BLOCKQUOTE>
	<B><FONT COLOR="#0000A0">Using UTF-8 with AspUpload</FONT></B>
	<BLOCKQUOTE>
	Starting with version 3.0, AspUpload is capable of converting
	UTF-8 encoded text fields and file names back into Unicode strings.
	<P>
	If you anticipate using Unicode characters in text data or the names
	of files you are uploading, you should instruct your browser
	to POST all the information in the UTF-8 format. This is done by including the 
	following tag in the header of your page:
	<P>
	&lt;HEAD><BR>
	...<BR>
	<B>&lt;META http-equiv="Content-Type" content="text/html; charset=utf-8"></B><BR>
	&lt;/HEAD>
	<P>
	On the AspUpload side, you must enable UTF-8 translation by setting the property
	<B>Upload.CodePage</B> to 65001 (a Win32-defined value for CP_UTF8):
	<P>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
	<TR><TD BGCOLOR="#FFFF00">
	<FONT SIZE="1" FACE="Courier New">
	&lt;%<BR>
	Set Upload = Server.CreateObject("Persits.Upload")<BR>

	Upload.CodePage = 65001<BR>
	...<BR>
	Upload.Save "c:\upload"<BR>
	%>
	</FONT></TD></TR>
	</TABLE>
	<P>
	The <B>Upload.CodePage</B> property can also be set to valid code page values such as 1251 (Cyrillic), 
	1255 (Hebrew), 1256 (Arabic), etc. Every time the CodePage property
	is set, AspUpload will attempt to translate the text data
	and file names into Unicode using the specified code page
	by invoking the Win32 function MultiByteToWideChar.
	<P>
	The code samples <B>unicode.asp</B> and <B>unicode_upload.asp</B>
	demonstrate AspUpload's Unicode support. Both files are shown here:
	<P>
	<B>unicode.asp</B><BR>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
	<TR><TD BGCOLOR="#E0E0E0">
	<FONT SIZE="1" FACE="Courier New">
	&lt;HTML><BR>
	&lt;HEAD><BR>
	&lt;META http-equiv="Content-Type" content="text/html; charset=utf-8"><BR>
	&lt;/HEAD><BR>
	&lt;BODY BGCOLOR="#FFFFFF"><P>

	&lt;h3>File and Text Items&lt;/h3><BR>

	&nbsp;&nbsp;&nbsp;&lt;FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="unicode_upload.asp"><BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File 1:&lt;INPUT TYPE=FILE NAME="FILE1">&lt;BR><BR>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description 1:&lt;INPUT TYPE=TEXT NAME="DESCR1">&lt;BR><BR>
	&nbsp;&nbsp;&nbsp;&lt;INPUT TYPE=SUBMIT VALUE="Upload!"><BR>
	&nbsp;&nbsp;&nbsp;&lt;/FORM><BR>
	&lt;/BODY><BR>
	&lt;/HTML><BR>

	</FONT></TD></TR>
	</TABLE>

	<P>
	<B>unicode_upload.asp</B><BR>
	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
	<TR><TD BGCOLOR="#FFFF00">
	<FONT SIZE="1" FACE="Courier New">
	&lt;HTML><BR>
	&lt;HEAD><BR>
	&lt;META http-equiv="Content-Type" content="text/html; charset=utf-8"><BR>
	&lt;/HEAD><BR>
	&lt;BODY><BR>

	&lt;%<BR>
		Set Upload = Server.CreateObject("Persits.Upload")<P>

		' Enable UTF-8 translation<BR>
		Upload.CodePage = 65001<BR>
		Upload.Save "c:\upload"<BR>
	%><P>

	Files:&lt;BR><BR>

	&lt;%<BR>
	For Each File in Upload.Files<BR>
	&nbsp;&nbsp;&nbsp;Response.Write File.Name & "= " & Server.HTMLEncode(File.Path) & " (" & File.Size &" bytes)&lt;BR>"<BR>
	Next<BR>
	%><P>

	&lt;P><BR>

	Other items:&lt;BR><BR>
	&lt;%<BR>
	For Each Item in Upload.Form<BR>
	&nbsp;&nbsp;&nbsp;Response.Write Item.Name & "= " & Server.HTMLEncode(Item.Value) & "&lt;BR>"<BR>
	Next<BR>
	%><BR>
	&lt;/BODY><BR>
	&lt;/HTML><BR>
	</FONT></TD></TR>
	</TABLE>
	<P>
	<P>
	Note that this script uses <B>Server.HTMLEncode</B> on file names and text items.
	This converts Unicode strings to a format understandable by
	a browser, such as  &amp;#1055;&amp;#1077;&amp;#1088;&amp;#1089;&amp;#1080;&amp;#1094;.
	<P>
	Click the link below to run this code sample:
	<P>
	<B><A TARGET="_new" HREF="http://localhost/aspupload/08_unicode/unicode.asp">http://localhost/aspupload/08_unicode/unicode.asp</A></B>
	&nbsp;<A HREF="javascript:;" OnClick="open('helppopup.html','','width=400,height=300');"><IMG SRC="help.gif" BORDER="0" ALT="Why is this link not working?"></A>
	<P>

	<P>
	<A HREF="manual_misc.html"><IMG BORDER="0" SRC="next.gif" ALIGN="RIGHT" ALT="Chapter 9: Miscellaneous Features"></A>
	<A HREF="manual_image.html"><IMG BORDER="0" SRC="previous.gif" ALIGN="RIGHT" ALT="Chapter 7: Image Handling"></A>

	<P>&nbsp;
	</BLOCKQUOTE>
	
	


	</FONT>
	<P>
	<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
	<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
	</TABLE>
	<P>
	<CENTER>
	<A HREF="index.html"><IMG SRC="logo_small.gif" BORDER=0></A>
	<BR>
	<FONT Face=arial size=1>
	Copyright &copy; 1998 - 2001 <A HREF="http://www.persits.com">Persits Software, Inc.</A><BR>
	All Rights Reserved<BR>
	AspUpload&reg; is a registered trademark of Persits Software, Inc.<BR>
	Questions? Comments? <A HREF="MAILTO:info@aspupload.com">Write us!</A>
	</CENTER>

</TD>
</TABLE>

</BASEFONT>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -