yairEO / fancyInput

Makes typing in input fields fun with CSS3 effects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to input Chinese or Japanese characters

AlloVince opened this issue · comments

will look into that, thanks

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

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

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.

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" → "にほんご" → "日本語").

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

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

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

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

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

@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.

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

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!

@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.