"Lau Lei Cheong" <> wrote...
> I'm trying to write a converter for converting between Big5 and UTF-8,
> but I want to make sure a few facts before writing.
>
> 1) I know that by default .NET store string in unicode. Would there
> be any problem if I store Big5 characters in the string?
This will not work,
> Or could I set the codepage setting for individual string?
No.....
> 2) There are basically three types of Unicode scheme - UTF-7, UTF-8
> and UCS-2. Which one does the default Unicode setting refer to?
The third is UTF-16. Well, you could use either, but String is UTF-16
only -- so it is much easier to convert to/from anything to UTF-16. To
convert to/from anything else, you have to go through UTF-16.
> 3) Same as 1) but this time is for char[].
Same answer.
> I'm writing this because the webpage I'm writing is in Unicode, it
> stores data to MySQL database which store data in Big5, and we also have a
> backend written in VB6 which would be nearly rewritting if need to change
to
> Unicode. Here, I plan to translate the data immediately when read from the
> database and vice versa so no other existing part need to be changed. I'm
> using LibEx with MyODBC for accessing MySQL.
Well, for this you may want to see what the database access will support so
you know what your choices are, and then also to see if the database layer
will handle the conversion from UTF-16 to UTF-8 or whatever automatically.
> This post will be crossposted to
> microsoft.public.dotnet.framework.aspnet. Any advice would be greatly
> appreciated. Whether for the questions or for a better way to fatch the
data
> so no manual translation is needed.
Technically, you mean it was multiposted (crossposting is posting one
message in multiple places at the same time, multiposting is posting one
message to multiple places separately). Generally crossposting is preferred,
since that will avoid having more than one thread and will avoid duplication
of effort of others....
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
This posting is provided "AS IS" with
no warranties, and confers no rights.