Chinese characters

This issue has been solved. See solution.
olivier_sophia's picture

Hello

I would like to forbid the use of chinese characters only in User Information Dialog.

I must use a VBScript using session.property("USERNAME") for example ?

Thanks

WFWI 6.2
Win XP SP2

EdT's picture

Not so easy

Solution

Will you include text on your dialog telling the users to only input Latin characters and not Chinese?
Can we assume that the input will be in a double byte character set even if the characters are Latin and not Chinese?  It's not clear from your posting as to which language(s) are installed on your XP machines.

What do you want to do with your VBScript|?   
session.property("USERNAME") will enable you to load the value of the USERNAME property into a vbscript variable, but what will you do with it then? Do you plan to write a custom action to test the language of the USERNAME input and abort the installation if it includes Chinese characters?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

olivier_sophia's picture

Will you include text on your

Will you include text on your dialog telling the users to only input Latin characters and not Chinese?

Yes it's a solution. But it will be better to forbid chinese.

Can we assume that the input will be in a double byte character set even if the characters are Latin and not Chinese?

i don't know how it's manage by the PC. When you user the keyboard you can know which table is used (ANSI, UNICODE) ?

What do you want to do with your VBScript|?   
session.property("USERNAME") will enable you to load the value of the USERNAME property into a vbscript variable, but what will you do with it then? Do you plan to write a custom action to test the language of the USERNAME input and abort the installation if it includes Chinese characters?

Yes , you're true. I'm searching to write a custom action to test the language of the USERNAME input and abort the installation if it includes Chinese characters. But i don't know yet if it's feasable.

Thanks

EdT's picture

Check registry

Perhaps one answer is to check the registry at HKCU/Control Panel/International, where parameters such as iCountry, Locale and sLanguage may help determine the language being used on the machine.
My experience of machines with a Chinese build is zero, but as far as the vbscript is concerned, if you can parse the USERNAME input and check each character to see whether it has a decimal value between 32 and 127,  then this should confirm whether ASCII is being used.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

B_Raj's picture

Links

olivier_sophia's picture

Finally our solution has been

Finally our solution has been to add a text.

Easy solution !!!

EdT's picture

Too Easy !!

Do you mean that you added a text message telling users not to use Chinese characters?
How many will not see, or will ignore this message ??

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.