Issue Details (XML | Word | Printable)

Key: WTR-71
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Bret Pettichord
Reporter: Bret Pettichord
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

Support Chinese Input

Created: 31/May/06 09:32 AM   Updated: 03/Jun/08 10:45 PM   Resolved: 06/Jan/08 03:35 PM
Component/s: HTML Controls
Affects Version/s: 1.4.1
Fix Version/s: 1.5.4

File Attachments: 1. File watir-cn.rb (2 kB) 31/May/06 09:39 AM - Bret Pettichord

Environment: book
Issue Links:
Relationship
 


 Description  « Hide

This patch was provided to support input of Chinese characters.

http://rubyforge.org/tracker/index.php?func=detail&aid=3232&group_id=104&atid=489

This patch is described in more detail here.

http://www.blogjava.net/raimundox/archive/2006/01/12/27676.aspx

We should either include this code in the main Watir code base or at least make it easier to extend Watir to support this kind of thing. There have been enough changes to TextField#doKeyPress since 1.4.1, that this code does not work with 1.5 as is.



Sort Order: Ascending order - Click to sort in descending order
Bret Pettichord added a comment - 31/May/06 09:37 AM

I reviewed this patch and made some changes to it so that it "worked" with trunk. When i say "worked" i mean that it ran and the tests ran ok, but somehow the text was not Chinese, but latinish gibberish.

I'm not exactly sure what the problem is, but is suspect it may be my Ruby config. I tried some of the suggestions here:

http://rubyforge.org/pipermail/wtr-general/2006-February/005081.html

One concern i have is that the recommendation there is to use WIN32OLE 1.8.3, but for other reasons Watir is tied to 1.8.2 (modal dialog support).

I'm also concerned that there are multiple Chinese encoding schemes (UTF-8, etc) and i'm not sure which one is used by this patch.

The best thing to do would probably be to formalize the "character_in" interface that Vincent Xu defined in his patch, so that future patches won't break. (I'm concerned that different languages and coding schemes may require different patches.)


Bret Pettichord added a comment - 31/May/06 09:39 AM

Revised patch to work with trunk. See comment for status.


Bret Pettichord added a comment - 12/Aug/06 10:51 PM

Ideally we add this patch to 1.5. But at minimum 1.5 needs to provide an interface (character_in) that makes it easy for users to add this kind of support.


Bret Pettichord added a comment - 06/Jan/08 03:35 PM

Applied patch as supplied in commit 1305.
http://svn.openqa.org/fisheye/changelog/watir/?cs=1305

All the tests pass (including the new ones provided with the patch), but when they run, I don't see any Chinese. I think this is probably because my computer is not set up for Chinese input.

I would like to see someone who has a computer set up for Chinese verify this before we close this ticket.