I am using Microsoft Project VBA to translate my activity names from English to Chinese.
My problem is I have some Chinese translations embedded in some of the English activity names. I want to strip out the Chinese characters before passing the string to Microsoft Translator.
Any ideas as to how I can do that?
You have to use
ChrW$()
as this:The
H6C49
is available (thanks God for that) on Unicode as CJK codes (Chinese, Japanese and Korean). See this to take a look of the characters range.So, you have to check the character Unicode code and then compare if it is already on the CJK range so as to translate it or not.
There is also a good explanation and even a program to translate strings here
You can use a
Regexp
to strip the Chinese unicode charactersWikipedia lists the relevant characters below
So this regexp will strip out these ranges. I have used aldo.roman.nurena's string example