Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Not able to input Chinese or Japanese characters #5

Open
AlloVince opened this issue Feb 25, 2013 · 14 comments
Open

Not able to input Chinese or Japanese characters #5

AlloVince opened this issue Feb 25, 2013 · 14 comments

Comments

@AlloVince
Copy link

No description provided.

@yairEO
Copy link
Owner

yairEO commented Feb 25, 2013

will look into that, thanks

@yairEO
Copy link
Owner

yairEO commented Feb 25, 2013

I don't know how to test this. if i copy/paste Chinese letters it seems to work, but i don't know how to input them myself..i don't know what the hell is going on with windows7.. I've changed the language to Chinese and it prints out english letters..so does Japanese..I don't know

@AlloVince
Copy link
Author

I think you could install a Google Japanese input to test:

https://tools.google.com/dlpage/japaneseinput/eula.html?platform=win&hl=en

After installed, you could click the "A" icon in your taskbar, and change it to hiragana, then you could typing Japanese characters

@friedbunny
Copy link

I can confirm that Japanese characters won't input — OS X 10.8.2 (Kotoeri) using Chrome 25.0.1364.99 beta. As you said, yairEO, pasting works just fine, but typing fails to display anything but perhaps a small blank space.

You don't necessarily need Google's IME, Windows comes with the ability to enable Japanese/Chinese IMEs: http://www.localizingjapan.com/blog/2011/01/20/japanese-input-on-windows-7/

Oh, and as for typing Japanese characters: Make sure you've turned it to Hiragana/あ (half- or full-width characters, doesn't matter) and that you type things that are actually words... like nihongo wo dekimasu!, which should convert to 日本語をできます! or similar when you hit the space or enter keys.

@friedbunny
Copy link

It seems this bug has to do with the IME not reporting a real character code, so there's nothing to convert and add to the display element. When you're typing in Japanese, the IME reports key code 229 and inserts characters on keydown, then converts them (if it can) to a Japanese character on keyup.

Example:

Type "h" — keydown and keyup both see "h"

Continue typing an "a" — keydown sees "ha" for the entire input and "a" for this character, but keyup sees the converted "は" for both

Hit space — on keyup, the IME further converts to kanji character(s), in this case typically "葉"

Hit enter — the IME finalizes the selection and we're done

... which means one possible solution would be to check if the key code is 229, insert new characters on keydown, and check to see if they've changed on keyup. But you'll probably have to check the raw ("shadow"?) input to see exactly what has changed, because converted character counts will often differ ("nihongo" → "にほんご" → "日本語").

@radmen
Copy link

radmen commented Feb 25, 2013

Maybe it's related so I'll post here. I can't use Polish national chars on Chrome (24.0.1312.57 m). Actually I can, but they don't appear.

It's working fine on Firefox.

http://screencast.com/t/crMUvWvG

@yairEO
Copy link
Owner

yairEO commented Feb 25, 2013

do you use MAC or WINDOWS?
if windows, do you use a normal windows keyboard for the problematic language?

@radmen
Copy link

radmen commented Feb 25, 2013

I'm on Windows (7 Pro). My keyboard is set to polish-programmer it's a standard keyboard layout.

@pzgz
Copy link

pzgz commented Mar 1, 2013

Cannot type in Chinese from my OS X mountain lion too, with Safari.

@yairEO
Copy link
Owner

yairEO commented Mar 1, 2013

can you please debug this and push a fix? I have no MAC, no OSX and no Chinese...

@vaicine
Copy link

vaicine commented Oct 9, 2013

@friedbunny, @AlloVince, @pzgz, @radmen and anyone else looking to use fancyInput with Japanese/Chinese/Korean input, I've added support on my fork: https://github.com/vaicine/fancyInput

Feel free to add any issues you find while using it.

@AlloVince
Copy link
Author

@vaicine I tried the new fork demo, but it still not able to input Chinese characters. Under win7sp1, firefox 24, with google chinese input.

@friedbunny
Copy link

Ditto—new fork still doesn't handle Japanese character conversion (roman-kanji
or kana-kanji) on iOS 6, Safari or Chrome. Thanks for the effort, though!

@vaicine
Copy link

vaicine commented Oct 10, 2013

@AlloVince thanks for trying it out - I tried it out under win7 with firefox and you're right, it's not working. Looks like firefox isn't sending the keycode 229 like chrome is. I could only get it to work on chrome.

@friedbunny I have used my fork here: http://kana.vaicine.com and this works for me under win7 chrome and OSX chrome. I also found it doesn't work on Android chrome as well as ios7 safari.

I'll investigate whether it's at all possible on those browsers, and hopefully come up with a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants