Hi Kevin,
I am not sure why you would need the Encoding class. All strings are
internally Unicode in .NET (unless you are dealing with _byte_ arrays).
Therefore, what I think you need first is to determine what range(s) of
numeric character codes constitute all the Chinese hieroglyphs. Then, just
define an RegExp pattern that would capture all such characters, for
example, if there are just two ranges:
[\uXXXX-\uYYYY]|[\uZZZZ-\uWWWW]
(of course XXXX must be numerically less than YYYY, the same goes for ZZZZ
and WWWW).
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Kevin" <ke***@home.nl> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi All,
I want to validate a string, and see if it contains any Chinese character
(simple or traditional). I'm trying to use RegExp and Encoding, but no
result.
Can someone point me a direction?
Kind regards,
Kevin