Article View: borland.public.cppbuilder.internationalization
Article #735Re: Edit Box
From: Maris Janis Vasilevskis
Date: Wed, 19 Feb 2003 07:50
Date: Wed, 19 Feb 2003 07:50
62 lines
3553 bytes
3553 bytes
KC wrote:
>
> I changed my code by deriving my form from TTntForm. I am able to set the
> caption to Chinese text using this->Caption = widestring.
>
> I have another question.
>
> Now, I created a resources dll. My application loads the resources dll. But
> the problem is the caption of the menu is not displayed properly.
>
> Regards
> KC
Hi KC,
I had a similar problem some time ago.
I detected that the reason is an incorrect work of "Update Resource DLLs".
I found a workaround, by setting IsDelphi5 to true always in TntWideStrPropHelper.
I posted it to Troy.
Troy did not accept my workaround considering it as Borland problem, not his.
So, currently I edit any new version published by Troy with my workaround (in the last version in is not setting IsDelphi5=true but commenting out {$IFNDEF COMPILER_6_UP} in TTntWideStringUTFPropertyFiler.ReadDataUTF8 and TTntWideStringUTFPropertyFiler.ReadDataUTF7).
Mahris
My letter to Troy Wolbrink at 9/5/2002:
Hi Troy,
I consider problems related with my specifics (application locale, different from computer locale) to be
a matter of stories. So, first a story.
I restored all changes I made in your sources, to convert the strings according to my application locale.
Instead, now I intercept Windows functions MultiByteToWideChar, WideCharToMultiByte, CompareStringA,
CompareStringW. If default locale/default codepage required, I substitute my application settings in the
first argument.
And now a thing of (possibly) general interest. TNT has problems with Update Resource DLLs in D6.
The simplest way to get the problem:
Create TntForm. Add language with big Unicode values (i.e., Russian).
Open the Russian form and enter some Russian letters in caption. Save. Look at DFM.
We have, i.e. #1081#1094 in Caption and +BDkERg in Caption_UTF7.
Build, set active language to Russian, run - all OK.
Now Update Resource DLLs.
We have unchanged Caption_UTF7. But Caption contains ??.
Build and Run - we see ?? in the caption.
If I open the form in editor, I see Russian letters at design screen. If I make some fictive change and
save it, DFM is correct again.
My workaround: TntWideStrPropHelper.IsDelphi5=True for all cases.
With it, the incorrect Caption is ignored.
Thank you,
Maris
Technical Details
Message-ID:
<3E533752.508E83FF@myself.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e38e687@newsgroups.borland.com> <3e38fc1c$1@newsgroups.borland.com> <3e39fc29@newsgroups.borland.com> <3E3A00EE.4090102@pspl.co.in> <3e3abace$1@newsgroups.borland.com> <3e46811b@newsgroups.borland.com> <3E475FA8.E11BA70A@myself.com> <3e48e2b3@newsgroups.borland.com> <3E48E852.D91137EB@hotmail.com> <3e51b523$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10297d,8160627fcd9505d8 X-Google-Attributes: gid10297d,public X-Google-ArrivalTime: 2003-02-18 23:41:31 PST Message-ID: <3E533752.508E83FF@myself.com> Date: Wed, 19 Feb 2003 09:50:42 +0200 From: Maris Janis Vasilevskis <mahris@myself.com> X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internationalization Subject: Re: Edit Box References: <3e38e687@newsgroups.borland.com> <3e38fc1c$1@newsgroups.borland.com> <3e39fc29@newsgroups.borland.com> <3E3A00EE.4090102@pspl.co.in> <3e3abace$1@newsgroups.borland.com> <3e46811b@newsgroups.borland.com> <3E475FA8.E11BA70A@myself.com> <3e48e2b3@newsgroups.borland.com> <3E48E852.D91137EB@hotmail.com> <3e51b523$1@newsgroups.borland.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 195.13.227.129 X-Trace: newsgroups.borland.com 1045640363 195.13.227.129 (18 Feb 2003 23:39:23 -0800) Lines: 62 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail