Thread View: borland.public.cppbuilder.internationalization
5 messages
5 total messages
Started by Tumurbaatar S.
Wed, 27 Sep 2006 16:37
Unicode char-s on control
Author: Tumurbaatar S.
Date: Wed, 27 Sep 2006 16:37
Date: Wed, 27 Sep 2006 16:37
10 lines
1281 bytes
1281 bytes
Hi! I'm trying to write my first international app in BCB6. It seems there's no way to display Unicode char-s that do not belong to any charset/code page (like Windows-1251 and etc). The Text and Caption properties accept only AnsiString string, so Unicode char-s are not allowed. Yes? P.S. VS.NET can display Unicode text on its controls. Is it a .NET feature?
Re: Unicode char-s on control
Author: Alan Bellingham
Date: Wed, 27 Sep 2006 17:50
Date: Wed, 27 Sep 2006 17:50
23 lines
1731 bytes
1731 bytes
"Tumurbaatar S." <spam_tumur@magicnet.mn> wrote: >I'm trying to write my first international app in BCB6. >It seems there's no way to display Unicode char-s that >do not belong to any charset/code page (like Windows-1251 and etc). >The Text and Caption properties accept only AnsiString string, so >Unicode char-s are not allowed. As far as I am aware, VCL doesn't support Unicode. Which is another strike against it, in my opinion. >Yes? > >P.S. VS.NET can display Unicode text on its controls. Is it a .NET >feature? No, so long as you can get the window handle (which is achievable in VCL, if I remember correctly), you just use SetWindowTextW() rather than SetWindowTextA(). Alan Bellingham -- ACCU Conference: 11-14 April 2007 - Paramount Oxford Hotel
Re: Unicode char-s on control
Author: Lesley Anne
Date: Wed, 27 Sep 2006 20:07
Date: Wed, 27 Sep 2006 20:07
24 lines
2161 bytes
2161 bytes
"Tumurbaatar S." <spam_tumur@magicnet.mn> wrote in message news:451aac8f@newsgroups.borland.com... > Hi! > I'm trying to write my first international app in BCB6. > It seems there's no way to display Unicode char-s that > do not belong to any charset/code page (like Windows-1251 and etc). > The Text and Caption properties accept only AnsiString string, so > Unicode char-s are not allowed. > Yes? Even though Text and Caption properties are listed as being AnsiString, you can assign WideString values to them as well, since the implementation of the AnsiString type isn't limited to single byte encodings. Unfortunately, I haven't been able to find a way to make them actually display correctly when given Unicode values higher than 0x00FF. The implementation of the display doesn't seem to have been done correctly. There are, however, third-party component libraries available to take up the slack. The one I've heard about the most often (though I haven't used it myself) is TNT. http://www.tntware.com/delphicontrols/unicode/ From the looks of it, you simply replace your TLabel's with TTntLabel's, TEdit's with TTntEdit's, etc. and then you can use Unicode values and have them display correctly, while keeping the ease-of-use of the VCL.
Re: Unicode char-s on control
Author: Tumurbaatar S.
Date: Mon, 09 Oct 2006 02:40
Date: Mon, 09 Oct 2006 02:40
36 lines
2665 bytes
2665 bytes
Thank you, all! Ok, so I can manually or thru 3rd party controls manage Unicode char-s for the controls. Is this true for database controls? I'm planning to use MS SQL2K with NVARCHAR string columns and TADOXXX controls. Can TADOXXX components read/write Unicode text? "Lesley Anne" <mspfila-ng@yahoo.com> wrote in message news:451ada0d$1@newsgroups.borland.com... > "Tumurbaatar S." <spam_tumur@magicnet.mn> wrote in message > news:451aac8f@newsgroups.borland.com... >> Hi! >> I'm trying to write my first international app in BCB6. >> It seems there's no way to display Unicode char-s that >> do not belong to any charset/code page (like Windows-1251 and etc). >> The Text and Caption properties accept only AnsiString string, so >> Unicode char-s are not allowed. >> Yes? > > Even though Text and Caption properties are listed as being AnsiString, > you can assign WideString values to them as well, since the implementation > of the AnsiString type isn't limited to single byte encodings. > Unfortunately, I haven't been able to find a way to make them actually > display correctly when given Unicode values higher than 0x00FF. The > implementation of the display doesn't seem to have been done correctly. > > There are, however, third-party component libraries available to take up > the slack. The one I've heard about the most often (though I haven't used > it myself) is TNT. > http://www.tntware.com/delphicontrols/unicode/ > From the looks of it, you simply replace your TLabel's with TTntLabel's, > TEdit's with TTntEdit's, etc. and then you can use Unicode values and have > them display correctly, while keeping the ease-of-use of the VCL. > >
Re: Unicode char-s on control
Author: Tumurbaatar S.
Date: Mon, 09 Oct 2006 02:44
Date: Mon, 09 Oct 2006 02:44
9 lines
1288 bytes
1288 bytes
Thank you! > No, so long as you can get the window handle (which is achievable in > VCL, if I remember correctly), you just use SetWindowTextW() rather than > SetWindowTextA(). > What about controls that have multiple items with text properties, e.g. TGrid/TDBGrid, TListView and etc?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads