April 22, 2008

Korean Hangul IME for Windows CE H/PC

Posted at April 22, 2008 12:05 PM in Software .

   The previous post alluded to this tool. Basically, I was trying to make a screen shot of this, so I could add this to the page/blog. Now that the tool was made, the screen shots taken, and I have a few moments it is time to share. The problem I was trying to solve here was that I was not able to type in Hangul on my Windows CE devices since they're from the North American market. I am building some stuff where many contents are shared and accessed from many device types in home and around the Earth. Part of my content is stored in Hangul, so access and searches on it require typing in Hangul.

This tool was developed as a stand alone application due to the fact that I was not able to easily find an override to the TranslateMessage API on Windows CE. If I was able to do that, I'd probably have let you type directly into the app you are using. Secondly, I was also unable to find a method to override or install a new IME with the developer's SDK on Windows CE 2.11. I am sure platform builder would allow it, but there's still a high likelihood that I may not be able to run that code on otherwise unaltered devices. I tried to ease the burden of this limitation of typing into a stand alone application. Two things were done to help with the usability and user experience. First, it is conveniently accessed via the task tray window near the system clock. Second, as you type the contents will be captured to the clipboard so you can easily paste into the target application that you wanted to input Korean text into.

Download it Here

This was not too difficult to build, but there's some prerequisites that you will need to do on your own that I am unable to provide, because I am releasing free I can't bear a license cost on externalities. You will need a Korean font to load to the device, I used one that I purchased in a Korean English dictionary for Pocket PC. I uninstalled the software from the Pocket PC and sits in a drawer, so I thought I'd make use of it as a single user. The spirit of the license seems reasonable that I can get use out of the font in one instance and in one place to be run by me.

Since the font to hold the Hangul character set can be large and the aged Handheld PC are relatively small in memory availability and most have externally expandable Compact Flash memory capabilities, I added a nice feature which lets you keep the font on the compact flash and still be registered with the Windows CE operating system. This will save a precious chunk of device storage at the expense of requiring the compact flash to be inserted when using the program.

After the link you can see a couple screenshots taken of the program on a Jornada 820 and a Pencentra 200 (with HPC2000 upgraded ROM).

The UI consists of an editable field and an item that sits in the task tray next to the clock on your system. It looks like the Korean flag, or as close to one that is reasonable given the dimension constraints on the icon. There is no file I/O in this program, the intent is to have you type your message in this program and paste the resulting content into another program such as Pocket Word.

Let's see some screen shots of the tool in action and then describe the installation and usage instructions.

Jornada 820


PenCentra 200 w/ HPC2000


Note the Korean flag icon in the system tray window, near the clock in the lower right. Also, notice that the program works with the soft keyboard on the PenCentra! This tool works in Windows as well, just was developed with portability in mind on Windows in order to speed development and debug time. Since it resulted in a completed work, this will also be provided for download. I would encourage you to use the IME facilities that Windows provides you with instead of this for the PC environments. Here's an article to describe how to get that set up on your Windows XP: Click here. There's also these Korean Hangul stickers you can stick to your keyboard until you get the hang of the positioning of Hangul characters in the keyboard layout: Click here.


Installation Instruction

Go to the download page for downloading the zip archive package for the platform you want to use. I broke the delivery packages into a PC platform, which was tested on Windows XP. The others for HPC 2000 and HPC Pro are all bundled together. This leaves you some work in finding the appropriate executable to load to your device and which method you want to go about doing that. Later, when I have some spare time I may go back and make an installer with CAB files and such, but it looked more complex than I was hoping and I can only test one configuration since my Active Sync does not work on my Jornada.

To find your H/PC version, you can go to the System control panel applet (Start -> Settings -> Control Panel -> System) and choose the "System" tab. My Windows CE 2.11 device says "Microsoft Windows CE, Handheld PC Edition Version 3.0" and I refer to that as "HPCPRO". My Windows CE HPC 2000 says "Microsoft Windows for Handheld PC 2000" and I refer to that as "HPC2000". Note that down.

Now that you're in the general area, you will want to find the CPU type. This is in the same spot, but rather than the "System" tab it is on the "Device" tab. The info after "Processor Type" is what you want to note down. My devices are a StrongARM and a MIPS. Note yours down near where you noted the Operating System version.

Next step is to unpack the zip file you downloaded to where you will remember how to access it. The contents for the Windows CE zip file is broken into this heirarchy:

<Operating System>\<CPU>\<Executable>

Where the Operating System you noted above, the CPU you noted above, and the executable being krinput.exe and a configuration file named krinput.txt. Using your storage card, IR, Serial Link, FTP, Active Sync, File Explorer, etc, you will want to copy these two files for your system's OS and CPU to where it makes sense for you to run the program from. Mine was in \Storage Card\Program Files\krinput\krinput.exe and \Storage Card\Program Files\krinput\krinput.txt. Note that the configuration file must be loaded in the same directory as the executable file.

Optionally, you could create a start menu item or desktop item by right clicking and choosing copy on the executable and then navigating to "\Windows\Programs" and choosing to Paste A Shortcut to appear on the "Start Menu". If you needed it on the desktop, then you can do the same thing in "\Windows\Desktop". Windows PC steps are similar, a web search will be able to give you massive quantities of tutorials for that.

Also, you will need a Korean font to make sense of any of the characters on the screen. Where you get that is up to you, I don't have a good pointer to give here due to my circumstance.

With the package installed, there is one more thing to do to ensure it is set up as you wish. First open the krinput.txt file in a text editor like notepad. There are three fields there that can be edited to change how the program executes. These are loaded when the program is loaded, so if you make any changes you will need to restart krinput.exe for these changes to take effect.

The three configurable items are: AddFont, AddFontPath, UseFontFaceName. It is best to have all these present and on their own line and with an = sign separating the field from the data. The data must end on a carriage return and line feed pair. That happens when you press the return or enter key in notepad. I will give an example of my initial configuration file that I used on my Jornada setup.

AddFont

A value of 0 means the program will not try to add the font to the Windows system fonts. You would leave this at zero if you have either installed a Korean font already or have placed your Korean font in the \Windows or \Windows\Fonts directory.

After registering you can make it zero to save a few steps of code, but that's not required. To initially register, ensure the value is the numerical number 1.

AddFontPath

This will only be used when AddFont has a setting of 1. This is the path to the font that you want to register in the Windows system. You can seem my example in the section below

UseFontFaceName

This is a very required entry to be give exactly the proper characters of how Windows recongises this font. After you have installed a font, you can then take a look in Pocket word or any other program that has a font selection box and note the name and include any spaces in case it uses multiple words.

My Example krinput.txt

AddFont = 1
AddFontPath = \Storage Card\fonts\gulim.ttf
UseFontFaceName = Gulim new

Note, I was adding a font that I put on my storage card called gulim.ttf and located in a fonts folder that I created on the card. This font exports a font face name of "Gulim new", so that is what is given there. You can find out that name in Pocket Word as described above or even by opening the font on a Windows PC and looking at the top line.


Operating Usage Instruction

On the device, double click to launch the program. You will see an edit field that you can type into and the Tray Icon near the system clock. The contents that you have typed will be stored on the clipboard as you type, so you can easily switch task to where you want to place the Korean text and paste it. This takes out some steps of highlighting the text and manually copying it to the clipboard. If you click the close button, the app will be minimized to the Task Tray instead for easier access. If you need to close it you can do so with the menu on the Task Tray icon. In Windows XP you can right click on the icon in the Task Tray to get to the menu. In Windows CE you will have to double click to see the menu.

This menu has three items: Open, About, Exit.

Open

Selecting this item will bring the window back to the foreground, so you can begin or resume typing your Korean text.


About

Selecting this will show a window with the information about this program, such as the name and version with a clickable link back to this website.

Exit

This exits the program, since there is no other UI available to close the program.

Comments

Hello, anyeong hasseyo :)
First of all, i wanna thank you for made this great apps available for us.
I'm a Jornada 720 (HPC 2000) user and I also have great interests in korean culture. This apps really answers my need for writing in hangeul.
Umm, I had tried this apps and it works great in J720, but I have some difficulties in showing the menu from tray icon. I've double-clicked the korean flag icon, but nothing showed. :-?
Am I missing some steps maybe ?
Thanks before.
-andra-

Posted by andra vijaya at May 29, 2008 01:02 AM

anyeong hasseyo!

I can't think of anything from my immediate memory. I will take a look at the source code to see if there are any steps that cause failure like you describe. If I can't figure that out, I will look for a Jornada 720. I had been meaning to buy one at some time any way. I'll post back here when I have something figured out. Otherwise you can pass an email to my email address and I can reply to you directly.

Best Regards!

Posted by wh at May 30, 2008 01:17 AM

wow, thanks :) i really appreciate it.
sorry to trouble you though, and I
hope you can find the solution soon. aja aja fighting ;)

Posted by andra vijaya at May 30, 2008 06:13 PM

Hi Andra,

I got my Jornada 720 now and found the problem. I have updated this software to fix it. Also applied the same fix (and more) on the Screen Grabber. Hope this finds you well!

Posted by wh at June 18, 2008 11:15 AM
Posting of new comments has been disabled for this post.