Solved

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

Posted on 2002-04-19
9
349 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
  • 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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