Hi,

Has $KCODE been mentioned yet on this list?

> I need to test some of our webproducts and websites in foreign
> languages and I'm having problems with testing using Asian
> characters (European characters seem ok)... I set the script to look
> for specific text like "?x?? ?????????? ???^?m??" --> (this is
> traditional Chinese for 'select "page forward" to continue') -- but it fails
> when run... Is there some sort of character setting I need to adjust in
> Watir? I have not tried the various possibilities but would it work
> better to change the search text to some encoding like Hexadecimal
> (\u9078\u53D6 \u300C\u4E0B\u4E00\u6B65\u300D
> \u4EE5\u7E7C\u7E8C\u3002) work better?

You need to tell Ruby the character set you're using in your script
using the KCODE directive. For example, put the following line at the
top of your script for UTF-8:

$KCODE = 'UTF-8'

Other recognised values are "EUC" and "Shift-JIS".

You'll still probably run into some issues with regexps and so on, but
that should get Ruby to understand your script.

I hope this helps.

Cheers,
Dave

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to