Solved

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

Posted on 2002-04-19
9
336 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now