UnicodeEncoding Class  [Visual Basic]See Also
UnicodeEncoding Members | System.Text Namespace 
Requirements
Namespace: System.TextPlatforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server familyAssembly: Mscorlib (in Mscorlib.dll)
Language
C#C++JScriptVisual BasicShow All
Represents a UTF-16 encoding of Unicode characters.For a list of all members of this type, see UnicodeEncoding Members.System.Object
   System.Text.Encoding
      System.Text.UnicodeEncoding[Visual Basic]
<Serializable>
Public Class UnicodeEncoding
   Inherits Encoding
[C#]
[Serializable]
public class UnicodeEncoding : Encoding
[C++]
[Serializable]
public __gc class UnicodeEncoding : public Encoding
[JScript]
public
   Serializable
class UnicodeEncoding extends Encoding
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.Res
This class encodes Unicode characters in Unicode Transformation Format, 16-bit encoding form (UTF-16); that is, the character is encoded in a 16-bit field consisting of two consecutive bytes. An extension mechanism, using pairs of fields called surrogates, enables another 220 characters to be encoded. The two bytes of an encoded character are stored in either little-endian or big-endian byte order depending on the computer architecture. In big-endian architectures the most significant byte is written and read first, while in little-endian architectures the least significant byte is written and read first.A UTF-16 encoding can be prefixed by a byte order  (U+FEFF) to indicate the byte order used. It is assumed that the encoding is big-endian if the byte order  is hexadecimal 0xFEFF, and little-endian if the byte order  is hexadecimal 0xFFFE. (A byte order  can also precede files encoded in UTF-8 format, but in that case the byte order  just indicates UTF-8 encoding; it does not indicate byte order. For more information, see the UTF8Encoding class.)This class contains a constructor, UnicodeEncoding, that can specify whether an encoding is little-endian or big-endian, and whether a byte order  is used.This class contains the GetCharCount method that reports the number of Unicode characters that result from decoding an array of bytes, and the GetChars method that actually decodes an array of bytes. The GetByteCount method reports the number of bytes that result from encoding strings or arrays of Unicode characters, and the GetBytes method actually encodes characters into an array of bytes.The GetDecoder method obtains an object to decode bytes. The GetPreamble method can obtain an encoded Unicode byte order .For more information about Unicode, see the Unicode Standard at www.unicode.org.This class implements the Encoding abstract base class.

解决方案 »

  1.   

    --> 楼上的,楼主要的是VB6,你怎么给了个VB.NET??::
    请问,你是指Unicode字符转化成指定代码页的MBCS字符,以及指定代码页的MBCS字符转成Unicode字符吗?
      

  2.   

    to Muf:
        我一直是搞数据库开发的,对Unicode什么的不是很熟悉。我现在是要写一个能对阿拉伯语字母进行处理的数据库软件(Office2000可以输入阿拉伯语),但是我的应用程序却怎么也不行。应该说VB6是全面支持Unicode的,但当我使用ASCW(X)-当X为一阿拉伯语字母,总是得到63,当X为东亚语言字符或西欧的一些语言字母时,却能得到正确答案,不知道为什么。Win2000自带的字符映射表中也能够正确显示阿拉伯语的Unicode值,不知那是怎么做的?
      

  3.   

    是啊java几行就可以实现此功能。
      

  4.   

    告诉我你的Email..我给你写个总结...
    我这是2000..文本太长贴不上去..不好意思哦。..