Hi,
Thank you for your post.
Based on my understanding, your question is how to process BIG5 file in
.NET. If I've misunderstood anything, please feel free to post here.
In .NET, a string is a sequential collection of Unicode characters that is
used to represent text. Each Unicode character in a string is defined by a
Unicode scalar value, also called a Unicode code point or the ordinal
(numeric) value of the Unicode character. Each code point is encoded using
UTF-16 encoding.
Encoding is the process of transforming a set of Unicode characters into a
sequence of bytes. Decoding is the reverse. The Unicode Standard assigns a
code point (a number) to each character in every supported script. A
Unicode Transformation Format (UTF) is a way to encode that code point. The
Unicode Standard version 3.2 uses the following UTFs:
* UTF-8, which represents each code point as a sequence of one to four
bytes.
* UTF-16, which represents each code point as a sequence of one to two
16-bit integers.
* UTF-32, which represents each code point as a 32-bit integer.
For a list of .NET supported encodings, please refer to following MSDN
Library article:
#Encoding Class (System.Text)
http://msdn2.microsoft.com/en-us/lib....encoding.aspx
System.IO.StreamReader is designed for character input in a particulear
encoding. StreamReader defaults to UTF-8 encoding unless specified
otherwise, instead of defaulting to the ANSI code page for the current
system.
To open a BIG5 encoding file, you must pass the specified encoding to
StreamReader, for example:
StreamReader sr = new StreamReader(@"c:\temp\1.txt",
Encoding.GetEncoding("big5"));
StreamWriter is like StreamReader, when not specified, will use an instance
of UTF8Encoding to encode the text.
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.