Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Display and enter Japanese & Chinese in delphi program

635 views
Skip to first unread message

Wong HL

unread,
Jun 17, 2002, 7:39:57 AM6/17/02
to
We have developed our program in delphi 6. Recently, we need to enable the
software to display and enter japanese & chinese characters.

We are using MSSQL 7 and all the fields have been designed in ntext, nchar,
nvarchar datatype. Without changing the control is there anyway we can go
about it?

Thanks


FL

unread,
Jun 17, 2002, 10:42:25 AM6/17/02
to
Use Chinese Windows or Japanese Windows.

Francisco

Bernhard Geyer

unread,
Jun 18, 2002, 2:09:59 AM6/18/02
to
Use the ElPack http://www.eldos.org/elpack/elpack.html to support Unicode in
your Application.
They also have Wide-DB-Controls.


"Wong HL" <won...@viaeasy.com> schrieb im Newsbeitrag
news:3d0dcb28_1@dnews...

Wong HL

unread,
Jun 18, 2002, 2:24:13 AM6/18/02
to
Thanks for your input. Currently I am using English Windows running some
language emulation software.
However all the control show only ?????? when asian character dataset is
entered or displayed.
Is there a way to enable the control to display asian character without
changing the control.

Thanks,
Wong
"FL" <frl...@hotmail.com> wrote in message
news:3D0DF551...@hotmail.com...

FL

unread,
Jun 18, 2002, 4:30:22 AM6/18/02
to
No. If you don't change the controls, there is no way. If you are using
English Win2K/XP, you can change the default system locale to emulate
Chinese or Japanese Windows.

Wong HL

unread,
Jun 18, 2002, 5:59:50 AM6/18/02
to
We are using devexpress control edit control. The asian character seems
display fine with non-db bound control. However for db bound control it
shows ?????? after the focus is removed from the control.

Any idea on this?

Thanks,
Wong
"FL" <frl...@hotmail.com> wrote in message

news:3D0EEF9E...@hotmail.com...

Troy Wolbrink

unread,
Jun 18, 2002, 8:55:49 AM6/18/02
to
If you want to enter Japanese and Chinese characters at the same time, the
only way to do this is to have a control that supports Unicode. The VCL
controls that come with Delphi do not support Unicode. I have a data-aware
TEdit and TComboBox that support Unicode when on the NT platform. (They
still work on Windows 9X, just without full support of Unicode.)

http://home.ccci.org/wolbrink/tntmpd/delphi_unicode_controls_project.htm


"Wong HL" <won...@viaeasy.com> wrote in message news:3d0dcb28_1@dnews...

FL

unread,
Jun 18, 2002, 10:26:40 AM6/18/02
to
There is some problem with your database backend. It is not accepting
the CJK characters. Which database are you using?

Francisco

Wong HL

unread,
Jun 18, 2002, 1:30:14 PM6/18/02
to
I am using MS SQLServer 7.0. All fields have been set to either nvarchar,
nchar and ntext. When I try to create a simple form using MSAccess, the data
seem display properly in Japanese and Chinese.

"FL" <frl...@hotmail.com> wrote in message

news:3D0F4320...@hotmail.com...

Wong HL

unread,
Jun 18, 2002, 1:34:42 PM6/18/02
to
Thanks for your input. However, my current application has been developed
mainly using devexpress db controls. It currently contains around hundred of
form. Any other recommendation instead of changing controls?

"Troy Wolbrink" <wolb...@ccci.org> wrote in message
news:3d0f2d94$1_2@dnews...

FL

unread,
Jun 18, 2002, 9:51:29 PM6/18/02
to
Are you using ADO?

Francisco

Troy Wolbrink

unread,
Jun 19, 2002, 12:00:15 AM6/19/02
to
> Any other recommendation instead of changing controls?

Displaying and entering Japanese and Chinese requires the use of Unicode
since there is no single ANSI code page which contains both Japanese and
Chinese. The control you are using is ANSI and not Unicode, so you are
stuck. If you want to display and enter Japanese & Chinese then you MUST
change controls! It's like you're asking how you can take a single stereo
speaker and produce a full surround sound stereo effect out of it. Hint:
You can't!


Troy Wolbrink

unread,
Jun 19, 2002, 12:02:46 AM6/19/02
to
MSAccess provides you with Unicode controls. (Delphi doesn't.)

Wong HL

unread,
Jun 19, 2002, 12:08:17 AM6/19/02
to
Yes I am using ADO component from delphi.

Wong

"FL" <frl...@hotmail.com> wrote in message

news:3D0FE3A1...@hotmail.com...

FL

unread,
Jun 19, 2002, 10:45:07 PM6/19/02
to
The problem here is that the DB controls you're using call AsString to
assign the text back to the database. The AsString function is ANSI
(i.e. not Unicode) and any "forced" conversion in a non Chinese/Japanese
OS will turn the characters into "?". No other solution unless you are
willing to change the controls.

Francisco

Wong HL

unread,
Jun 20, 2002, 2:21:18 AM6/20/02
to
Hi Francisco,

Thanks for all your input. You have been very helpful.

Just a further question, can I just change the DB control instead of all the
screen edit
controls. I believe my current issue is due to the data conversion by the db
control.
As if I use the non-db bound control, it captures the Japanese & Chinese
character properly.
However if I use the db-bound control, the data change to "?" once the focus
is removed
from the control. Am I making the correct assumption?

If so please recommend some ADO control that support Unicode.

Thanks
Wong

"FL" <frl...@hotmail.com> wrote in message

news:3D1141B3...@hotmail.com...

FL

unread,
Jun 20, 2002, 7:59:56 AM6/20/02
to
If you don't mind working with a component set with no source code and
no support, you can try my Unicode control library. It consists of abour
40 components that are Unicode aware (even for Win9x). It is only for
Delphi 5 (not Delphi 6, as I didn't buy Delphi 6).

http://macaucity.virtualave.net/WideControls.zip

Just copy the .DCU files to a directory of your choice, add the library
path in the IDE and place the .BPL files in your system path. Then
install the dcl*.bpl files. The freeware RxLib is necessary if you
install the RxLib specific package.

Francisco

Troy Wolbrink

unread,
Jun 20, 2002, 5:56:43 PM6/20/02
to
http://home.ccci.org/wolbrink/tntmpd/delphi_unicode_controls_project.htm

It has a Unicode enabled TDBEdit and TDBComboBox.

Wong HL

unread,
Jun 21, 2002, 4:43:11 AM6/21/02
to
To Francisco & Troy Wolbrink,

Thanks for your help.

Wong

"FL" <frl...@hotmail.com> wrote in message

news:3D11C3BC...@hotmail.com...

0 new messages