aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Unicode text editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Unicode text editor" Watch "Unicode text editor" New topic
Author

Unicode text editor

Debashish Chakrabarty
Ranch Hand

Joined: May 14, 2002
Posts: 230

My exposure to Swings have only been academic so do pardon me if this question is too lame. I have been working on a Unicode Text editor (for Hindi). I also hacked the Notepad application and was able to display all Menu/Toolbar items in Hindi. I am also now able to open a Hindi UTF file and see the Hindi text in JTextArea properly. I am also able to save any UTF text pasted from another application.
What I have no clue about is how can one type in Hindi in the JTextArea. How will I map the keystrokes correponding with required Hindi Unicode characters etc? For eg.if I press K (and assuming that the key K has been mapped with /u0915) Hindi character "ka" must be inserted in the JTextArea.
Any guidelines and links would be appreciated.
[ April 28, 2004: Message edited by: Debashish Chakrabarty ]

Debashish
SCJP2, SCWCD 1.4, PMP, ITIL Foundation
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I think, when you save data into file, you must use java.io.InputStream or java.io.OutputStream


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Kathy Walrath
Author
Greenhorn

Joined: Apr 26, 2004
Posts: 13
I believe you need to look into input methods. One link that looks promising is this one:
http://developers.sun.com/dev/gadc/technicalpublications/presentations/iuc22_thai_hindi.pdf
[ April 28, 2004: Message edited by: Kathy Walrath ]

Kathy Walrath<br />author, <a href="http://java.sun.com/docs/books/tutorial/" target="_blank" rel="nofollow">The Java Tutorial</a><br />editor, <a href="http://javadesktop.org" target="_blank" rel="nofollow">javadesktop.org</a>
Sharon Zakhour
Author
Greenhorn

Joined: Apr 26, 2004
Posts: 10
I also edited a relevant article that Naoto wrote for The Swing Connection --
Using Input Methods on the Java Platform. Naoto recently updated this article
for release 1.5 -- it will probably be released on the javadesktop.org
website.
Sharon Zakhour
Debashish Chakrabarty
Ranch Hand

Joined: May 14, 2002
Posts: 230

Thanks verymuch both of you for the pointers. Exactly what I needed
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unicode text editor