Windows IME Japanese duplicate text in input - ime

I use text input with contentEditable="true".
While typing with windows IME Japanese (Hiragana) some times the text is duplicated.
for example: I am typing "aeiou" which is supposed to be in Japanese "あえいおう" but the result is "あえあえいおう".
I use chrome browser.
example image

Related

Text display odd in Sublime Text

I have a display problem of Sublime Text (a source code editor).
Background:
A desktop computer running Windows 10, Sublime Text 3
Tried different versions of Sublime Text on this desktop computer, with computer restart/power-off, all show the same display problem
Another computer using the same version of Sublime Text 3, displays fine.
The display problem only exists with Sublime Text (not any other apps) in this desktop computer:
the header bar display odd texts (file names of open tabs)
when pressed keyboard shortcut Ctrl + h, it shall pop up a text Find an Replace box. (please see screenshot), in my case, there is a box popped but with no texts displayed.
The problem solved by a directly copy (whole folder) of a portable version of Sublime Text 3 from another computer (#1).
Everything seems working fine and normal (computer #2), including the setting and packages done from the computer #1.

RTL input for kivy/ Persian input in kivy and kivymd

I am using kivy to develop .apk for android, and I am having trouble set RTL language ( Persian so to speak) to be suitably used as user input. Instead I am observing characters are shown as  that are unrecognizable characters. Just note that I can use reshaper and bidi to fix RTL MDlabels, but for user inputs I couldn`t find a way. I need to see correct Persian (Kurdish, Arabic, ...) letters whilst getting user input.

MSKLC under Windows 10: Create custom keyboard layout which supports IME (input method) for Chinese and combined input in Spanish

This question is originally posted by me in Microsoft Community at:
https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/msklc-under-windows-10-create-custom-keyboard/8c5a7137-d575-4247-8ab3-b4dd1e5fb437?tm=1495318604424
In summary: I have created a custom keyboard layout with Microsoft Keyboard Layout Creator 1.4 in Windows 10, it is working but only partially. It cannot:
combine two keystrokes into one to type a "combined letter", e.g, "¨"+"u" = "ü". It should not exist in Chinese but I want to achieve this.
type Chinese pinyin and Chinese punctuation. In MS pinyin IME, I can press shift to switch between Chinese pinyin mode and English mode. Under pinyin mode I can convert letters into pinyin and thus get Chinese characters, but my layout lacks this. And, if I press "," in Microsoft Pinyin in pinyin mode, it should give me ","(full length comma), but this layout is not able to do this.
I am thinking about two ways to solve this:
Substitute Microsoft Pinyin's keyboard layout to my layout(replace the English part of MS Pinyin with my layout)
Copy the pinyin part of MS pinyin to my layout.
So, how can I solve this?
I have solved it.
For the first problem, you must define some "dead keys combinations". The details are explained here:
http://www.angelfire.com/planet/linguisticsisfun/Creating_a_Keyboard_Using_MSKLC.pdf
For the second problem, basically you do:
Create your keyboard layout.
Edit the .klc file with a Text Editor, to change the VK code mapping. That is because most of the applications in Microsoft Windows, when you press the hotkeys, detects VK code sent to OS, not the "key chars"(the characters output as you type in a text processing software). So in order to make the key chars of your keyboard layout to match with their VK code, you must do this manually. MSKLC will not change that for you. Some details here:
http://www.sensefulsolutions.com/2010/08/how-to-fix-keyboard-shortcuts-in-klc-eg.html
Install the layout.
Open your registry editor, enter HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\, find your new keyboard layout at the bottom (mine with name like a0000xxxx). Copy the dll file name. That is the DLL file containing your newly created keyboard layout info.
Go back to the registry father branch, search the language you want to apply this layout, like Chinese or Spanish. You will find several variations with names alike, but the descriptions are self-explanatory and can help you differentiate them.
Simplified Chinese uses KBDUS.dll, that means "keyboard layout for US keyboard". This will apply to MS Pinyin, too. Change this value to your copied DLL name, so that it will load your DLL next time the OS launches.
Restart.
The result:
I can type English and Chinese pinyin with Microsoft Pinyin with my custom keyboard layout, and I can navigate next/previous page with , and ..
With this keyboard layout I can type Spanish special characters, like ï, á, ç, ñ and € without switching to Spanish keyboard.
Hotkeys in any software are working as expected, because now VK code are matched with letters printed on the keys.

VIM automatically changing font and encoding for CJK

I was using VIM mainly for editing code. However, I want to extend its using to daily casual text reading. I need to read both Chinese and Japanese files, with CP932, CP950 and CP936 code page.
There are threads discussing about how to set guifontwide and encoding, but what I want is to automatically display different content using different fonts. For instance, a Chinese character rendered with Japanese font looks terrible, and vice versa. Also, A Chinese font library doesn't essentially contains all Japanese characters, and vice versa.
What I want is some kind of script, that sets VIM to use different encoding and font when Chinese is detected, and another set of encoding and font when Japanese is detected.
I am using GVIM 7.4 on Windows 7 64 bit US_EN version.
Any suggestions are welcomed.

RTL language with Sublime Text editor

The RTL languages are not supported in the sublime text editor
I tried this plug-in Bidirectional text support
on windows os
Copied all files from the zip Sublime-Text-2-BIDI-master to the ST3 folder and changed the font type and size.
then I copied the unicodedata.pyd to C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\Bidirectional text support\bidi
now the Tools > Bidirectional text part didn't look gray anymore but it is still disabled.
also I copied these two lines but it didn't work
sys.platform.startswith('win'):
sys.path.append('../../..')
Any help would be appreciated
In order to get Sublime Text to work with Arabic characters using Sublime Text BIDI plugin on Windows correctly, ensure you've done the following:
Copy the plugin folder to the following path C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\
Copy unicodedata.pyd from ST installation directory to both, the main plugin folder which in your case is Sublime-Text-2-BIDI-master and inside bidi folder.
Set your sublime user-settings to the following:
{
"font-face": "arial",
"font_size": 11,
"default_encoding": "UTF-8",
"fallback_encoding": "Arabic (Windows 1256)"
}
Reload the plugin by viewing rtl.py and saving
In the case that doesn't fix it, you can read what sublime console log outputs when you click on Bidirectional text for a given Arabic text, console log can be accessed through ctrl+~.
Very Easy,
Just follow this Video steps
دعم اللغة العربية في برنامج Sublime
1- Download the Sublime-BIDI-master folder from Github of solution
2- Extract it and paste under \Sublime Text Build (whatever)\Data\Packages(the downloaded folder).
3- open sublime wit any RTL Language file and right click anywhere you'll new options (Bidirectional text) .. Click it :).
However, in my Sublime version (build 3126), Arabic letters will be reshaped when switching to Bidi.
Initially in the range U+0621-U+064A, which are the usual Unicode codes for Arabic letters, characters will be mapped to the range U+FE70-U+FEFC, which are codes for each (isolated, initial, middle, final) Arabic connected forms. These latter codes, called Arabic-Presentation-Forms-B, are deprecated by Unicode and their usage should be very limited.
For example, before switching to Bidi, the word كتب, looks ب ت ك, from left to right U+0643 U+062A U+0628. This is the memory order. (It is up to the final rendering tool to display the string in visual order by connecting letters.)
After Bidi switching in Sublime, the word will appear good as كتب, because the codes are ﺐ ‎U+FE90 followed by ﺘ U+‎FE98 followed by ﻛ U+‎FEDB. In this order. That means, in a Bidi enabled tool like a browser, it will appear ﺐﺘﻛ as the final visual order. This is not what the user expects.
So, not only Bidi switching changes the letters code, it also changes the memory order.
Personal experience.
When editing a source file (HTML and other languages or formats) containing some RTL characters, it is really tricky to navigate in the text edited. So the mode "before" (logical or memory order) might be very helpful than the mode "after" (visual or display order). With logical order, it's useless to join letters, it doesn't make sens.
Check this link, I had the same problem but solved it with the Sublime Text BIDI plugin.
I was still facing an issue because of the editor's font. It will be recommended to use a fixed-width font like Courier New. This should ensure the plug-in works as expected.

Resources