dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
10652
share rss forum feed


Rimi
Premium
join:2002-03-05
The World

2 recommendations

Japanese Text Input: Howto

As per a request:

Ever wanted to put Japanese text into a form, but the entered text comes out all garbled after it's posted? Well here's a way in which you can make the text show without it getting all garbled. BUT...(LOL), there are some things that need to be installed on the PC in order to input and view the Japanese text:

1) You have a Japanese IME (Input Method Editor) installed. This is needed for Japanese text input.
2) A Japanese font like MSMINCHO.

If you don't have these installed, here's a link that can give you a start in getting the packages installed. The easiest to install are the ones for Windows 2000/XP since the software in already on the installation CD.

»www.geocities.com/fontboard/cjk/cjksupp.html

Okay, once you have the 2 requirements installed, it's just a matter of getting the inputted Japanese text onto the webpage form. The first thing you'll need is a unicode-enabled text editor. The one I use is called UniRed. All the pics are from this program. Here's a link to the program:

»www.esperanto.mv.ru/UniRed/ENG/index.html

Open up the program and change the Windows IME to "Japanese". You then should be able to enter the Japanese text directly into the editor, as in the pic below.

»/r0/download/2···0000.jpg

Once you have entered the text, go to save the text into a file. Select the "Save As" option since you will need to save the text under a specfic format. You will see the dialog box as in the pic below. Notice the box that has the purple circle around it. This is a dropdown box. Select the option that has "&#DDDD;". Then enter a filename and save the text.

»/r0/download/2···0001.jpg

Now you need to open the saved text file using Notepad (as shown in the pic). Highlight all the text that is in the file. Then do a "Edit>Copy" or use the Ctrl-C to copy the text to the clipboard.

»/r0/download/2···0002.jpg

Now go the the browser and open the webpage with the form that you want to enter the text. Paste the text from the clipboard into the form. Your form entry will look something like the pic. Then post/submit the form.

»/r0/download/2···0003.jpg

Now when the posted/submitted form is viewed, you should see the Japanese text on the webpage.

»/r0/download/2···0004.jpg

This method will allow you to enter Japanese text onto a host system what does not support MBCS (multi-byte character set) text. This technique can also be used for other MBCS text like Chinese, Korean, etc.

Now for the "small" problem. Not everyone will be able to see the Japanese text. They will need to have a Japanese font installed on their system (using one of the 2 options from above). So this is only good for people that have the capability to enter/view Japanese text (but then this would be a requirement even if the hosting system was configured to handle Japanese, or MBCS text).

So there you have it. Hopefully this will be of some use for people that need to get Japanese characters to appear in a web form page. Now easy, but at least it give you the option to enter an unsupported character set.
--
"He who hits head on wall, gets big bruise."..LOL



Rimi
Premium
join:2002-03-05
The World

And if you can't use the Global IME...

Well, wouldn't you know it. This method works great under Windows 2000/XP with the Japanese IME installed or under Windows 95/98/ME if you have a IME package that allows Japanese text input into a Windows applications. But Microsoft changed the way the downloadable Global IME package installs itself. It only allows Japanese text input under Internet Explorer. So having UniRed doesn't help without a Windows OS Japanese IME in place.

So to "fix" that problem (since you can use the Global IME to input Japanese text via the Internet Explorer), I have created a simple web-based S-JIS to Unicode converter. You can enter the Japanese text into the textbox, click the "convert" button, the copy/paste the generated unicode into the form you want the Japanese text to appear. It's a simple alogorithm so it may give strange results, but so far I have not come across. Well here's the link:

»www.angelfire.com/space/mahoro/jisuni.html

Hopefully this will make it easier to do the conversion. I think it'll work with other characters sets too. I don't have those IMEs installed so I didn't check it.
--
"He who hits head on wall, gets big bruise."..LOL