 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tony Webster Guest
|
Posted: Tue Jul 20, 2004 11:13 am Post subject: TNT controls, ExtTextOutW and Greek |
|
|
I am currently using the excellent TNT controls to convert an application
to multi-language support:
http://tnt.ccci.org/delphi_unicode_controls/
However, I have run into a particular problem with Greek and the
TNT DBGrid - although I don't think it is a problem with the TNT
controls per se. What happens is that the Greek text comes out as
blocks.
I traced this down to the following call to ExtTextOutW in unit
TNTGraphics:
Windows.ExtTextOutW(Handle, X, Y, Options, @Rect, PWideChar(Text),
Length(Text), nil);
I found with Greek that if I change "Length(Text)" to "Length(Text)+1"
then the Greek text comes out okay - however other text can acquire a
spurious character at the end.
For example, for the string "ΑΘΗΝΑ" the memory
at Text looks like this:
$91 $03 $98 $03 $97 $03 $9D $03 $91 $03 $00 $00
This looks much as I would expect (see http://www.unicode.org/charts/PDF/U0370.pdf)
10 bytes of text, with a null character just beyond the end, and
Length(Text) returns 5 above. However, if I want this to display
properly, I seem to need to pass 6 as the length parameter to
Windows.ExtTextOutW.
Can anyone explain what is happening here?
Thanks,
Tony
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|