pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 518 forks source link

OSX can not input chinese #390

Closed dpull closed 8 years ago

dpull commented 9 years ago

OSX can not input chinese

pkulchenko commented 9 years ago

@dpull, do you have any more details on this? Are you using Chinese input method? There are couple of related tickets (#113, #232) that are related to wxwidgets defects (for example, 15345) and should be resolved after #260 is implemented. I'm not certain that fixing this will resolve the issue though. Can you input Chinese symbols using the same method in something like Notepad++ (it's using the same editing component as ZBS, only a different version)?

joe528 commented 9 years ago

I have seen this problem since day 1 I started to use ZeroBrane but I can live with it (because I don't use Chinese often in ZeroBrane). However, yesterday I was in a Chinese forum thread that was discussing CoronaSDK editors and I told them I like to use ZeroBrane. Someone raised a question about this issue, so I came to provide more additional information.

When you input traditional Chinese characters, most people use "Zhuyi" method (I am not sure if other methods cause the same issue because I only know this method). You type a few Zhuyi symbols and they will be formed into a Chinese character. For example, "ㄨㄛˇ" (a few Zhuyi symbols) will become "我” (a Chinese character).

In ZBS, somehow, these Zhuyi symbols will not be formed into Chinese characters, only Zhuyi symbols are entered into the editor.

In earlier versions (for example, 0.38 the first version I started to use), I could quickly press CMD-F to bring up Find/Replace dialog and input Chinese characters into the text field and then I can copy & paste them into the editor. However, I don't remember since when, the text field in Find/Replace dialog behaves like the main editor window too that only Zhuyi symbols are shown because they cannot be formed into Chinese characters.

You mentioned about Notepad++, is this an app in OSX? I cannot find it somehow.

pkulchenko commented 9 years ago

@joe528, thank you for the details. I think the best way may be to give you the new wx.dylib library that may eliminate this issue. I plan on compiling it tomorrow.

pkulchenko commented 9 years ago

@joe528, can you try with the following version. You only need to replace bin/libwx.dylib with the version in the archived file and check if the updated version does any better handling of Chinese characters. Thank you.

joe528 commented 9 years ago

Where should I put the file "libwx.dylib"?

You said "bin/libwx.dylib" but where is it in my Mac?

How to make sure if I put the file into the right place where I launch ZBS?

Need more info, sorry that I am not familiar with the structure.

pkulchenko commented 9 years ago

@joe528, you can "open" ZeroBraneStudio.app by right clicking on it and selecting Show Package Contents and then going to ZeroBraneStudio/bin folder. It should replace libwx.dylib file that is already there (you may want to save the current file as a backup).

If you installed ZBS into its default location, then it's going to be at /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/libwx.dylib. When you start ZBS and go to the About script (F1), you should see Built with wxwidgets 3.1.0 at the bottom of that panel.

joe528 commented 9 years ago

I just tried it and made sure About is showing wxwidgets 3.1.0,

but the result is the same.

Additional info: usually when entering Zhuyi symbols, there should be an underline under these symbols before they can be formed into a Chinese character (and if the Zhuyi symbols can be forming multiple Chinese characters, I can click down arrow key to pop up a dialog to choose the right character). For now, whenever I type a Zhuyi symbol, there is no underline and the symbol is entered as a text directly.

joe528 commented 9 years ago

I made a screen video to show you the issue if it helps a bit.

Here it is:

http://myapp.com.tw/_joe/ZBS_Chinese_input_issue.mov

pkulchenko commented 9 years ago

@joe528, thank you for the useful video. It's possible that Scintilla editor component included with ZBS doesn't yet handle IME composition, but the new version of it should. I plan to recompile and give you a chance to re-test when wxwidgets ticket 16776 is merged into trunk.

leolovenet commented 8 years ago

+1

pkulchenko commented 8 years ago

@joe528, @leolovenet, @dpull, I've uploaded a new version of wx library that includes the latest wxwidgets upgrade along with scintilla 3.6.3. Could you give it a try and let me know if there are any changes in handling Chinese input?

To install: (1) unzip the archive, which includes only one file libwx.dll. (2) "open" ZeroBraneStudio.app by right clicking on it and selecting Show Package Contents and then going to ZeroBraneStudio/bin folder. (3) replace libwx.dylib file that is already there (you may want to save the current file as a backup).

If you installed ZBS into its default location, then it's going to be at /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/libwx.dylib. When you start ZBS and go to the About screen (F1), you should see Built with wxwidgets 3.1.1 at the bottom of that panel.

leolovenet commented 8 years ago

@pkulchenko , i have tried it. yes, it can handing Chinese input now, but, with some problem,not perfect.

1 2

as you can see, the toolbar have a list of chinese words, at the bottom of the screen, It should be under the cursor, as in a joe528's video display.

pkulchenko commented 8 years ago

@leolovenet, thank you for checking. Could you run ide:GetEditor():SetIMEInteraction(wxstc.wxSTC_IME_INLINE) in the Local console? It should switch to "inline" IME. I'm interested to see if it's supported and if it looks better than the windowed one.

pkulchenko commented 8 years ago

I also tested on Windows and it has the same effect (the IME window is shown at the left top corner of the screen), so it doesn't seem to be something unusual. If you have a chance to try the "inline" IME, I'm interested to see how it works for you.

leolovenet commented 8 years ago

@pkulchenko after running the command, it seems no change.

564c3a88-d7ac-4b87-90b2-b4007b5b4c19

It should be this way

135c7b41-8fe8-4760-a376-fbc144577a0b

What else can I help, just tell me. its my pleasure.

pkulchenko commented 8 years ago

Closed by the completion of #260 (merged wxwidgets31x-upgrade branch).