?
Solved

Adding "Far-East Characters" support in an existing project/application

Posted on 2002-04-19
9
Medium Priority
?
363 Views
Last Modified: 2013-12-03
I have a project that now needs to support Japanse language & characters. As far as I know, Delphi5 VCL TEdit and other controls in my existing project doesn't support Unicode, so it will not be possible to enter characters into these controls.

Can anyone enlight me what to do with all this?

Do I need to replace all controls in my project with Unicode controls and replace all string types with WideStrings? Will that do or is it more?

How does japanese developers do? is there a special version of Delphi that supports UniCode?

Can my project be recompiled on a japanese Delphi5 if so?

Is there a way to enable input of unicode in a TEdit control during runtime with Win API by setting/sending any value to the EditBox window handle?

0
Comment
Question by:Probie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 1

Expert Comment

by:Alone
ID: 6953165
Try to download NT Unicode Controls from http://home.ccci.org/wolbrink/tntmpd/delphi_unicode_controls_project.htm

WBR...
0
 
LVL 1

Expert Comment

by:Alone
ID: 6953176
And, as I know, there is no special, Unicode version of Delphi. This is a BIG problem not for Japanese developers only...
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6953329
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:andyho
ID: 6990961
To support japanese in a Delphi application it does not necessarily need Unicode - Unicode would only make it much easier to implement. There is a 8bit charset used for japanese Windows in Win3.1 already, the only difficulty is that it is a MBCS (Multi byte character set), thus the easy string operations don't work on it. But if you set all the input and output controls to that charset (SHIFTJIS_CHARSET), and use the WideCharToMultiByte(CP_ACP,...) API call to convert your Unicode to that charset, and vice versa, you can create an application which does show japanese in the interface but internally uses Unicode.

The alternative is to convert the application from VCL to CLX, for those the Qt layer does all the Unicode handling, even on Windows versions which don't support Unicode.
0
 
LVL 1

Author Comment

by:Probie
ID: 6993617
Well, I can't get your "SHIFTJIS_CHARSET" to work.

Can you give an example?
0
 

Expert Comment

by:andyho
ID: 6993773
It's at the font property:

edit1.font.charset:=SHIFTJIS_CHARSET;

or select that value in the object inspector. Unless you use different fonts for the controls it's enough to set just the form1.font.charset.
0
 
LVL 1

Author Comment

by:Probie
ID: 6993836
Well, I have no problem with setting the charset...
I have been working with Delphi for 5 years now so I know such stuff.. hehe...

Setting the charset doesn't make it possible to input japanese characters into the Edit box...

The problem is far bigger then just setting a character set..


0
 

Accepted Solution

by:
andyho earned 900 total points
ID: 6993887
It only works on a japanese windows, as only those have the CP_ACP set to 932, the japanese multi byte character set - AFAIK it's not possible to set the ACP codepage.
0
 
LVL 1

Author Comment

by:Probie
ID: 6993934
Well, I have to reject your proposed answer then.

I need to know the best way to make it possible to enter japanese characters into any windows system that supports japanese characters.. (ex US version of Win2000 with Japanase supprt installed)

There is no problem in input japanese characters into a RichEdit, but that is because RichEdit supports Unicode.

I need a way to make TEdit to support Unicode...

0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question