If the version of Windows (English vs. Thai) was the problem, then
_all_ tLabels would be affected. Since only some are being affected,
that's not it.
Changing font.charset to THAI_CHARSET might help, not sure because
then why does the other tLabel work with DEFAULT_CHARSET, but it's worth a try.
Concatenation of double-byte characters might cause a problem
(although even that should work), but of a single-byte character set
should not be an issue.
Does this occur on your system as well when you set the OS for
Thai? If so you can try to use the debugger to look at what's going
in there...
(Screen shot didn't come through, the list must not allow them.)
At 11:19 PM 6/29/2009, Ross Levis wrote:
Good point, but the font is the same (Arial) and also same
"DEFAULT_CHARSET" for both components.
I've attached a portion of a screen shot showing the problem. The ListView
item below the green one is displayed in the yellow Next Track area above,
but it's just rubbish.
I just found out that another label on another form, showing just the
artist, the characters look correct. So perhaps it is to do with the
concatenating?
Label.caption := listitem.caption+' - '+listitem.subitems[0];
It is Windows XP, and not sure if it is a Thai Windows or not. Will that
actually make some difference when the Non-Unicode App setting is set to
Thai in the Control Panel. The user sent a screen shot showing this was set
correctly.
Thanks,
Ross.
-----Original Message-----
From: delphi-boun...@elists.org [mailto:delphi-boun...@elists.org] On Behalf
Of Sid Gudes
Sent: Tuesday, 30 June 2009 4:09 a.m.
To: Borland's Delphi Discussion List
Subject: Re: Non-unicode issue in D7
Thai does not need Unicode, as the number of letters in the Thai
alphabet fits into a 1-byte code. Special fonts are used to
represent the Thai characters.
Is perhaps the "Font" attribute of the tLabel set to a font name
different from that of the tListView? If so, there may be a Thai
equivalent of the tListView font, but the tLabel font may be
English-only. If so, the label will display those characters in the
range #80 to #FF in an English font, which will include all those
funky characters such as accented letter and diphthongs.
What does the tLabel look like? Can you get a screen shot? That
might help diagnose the problem. Also, is the user using Thai
Windows, or English Windows set for Thai? There is a difference in
the way fonts are rendered between these (in Win 2000 and Win XP,
don't know if Vista does it that way).
At 06:19 AM 6/29/2009, Ross Levis wrote:
>My D7 app is not Unicode compliant at all.
>
>
>
>A Thai user is complaining of a strange problem where Thai characters
appear
>correctly in a ListView, but not correctly in a label just above the
>listview. The label is a Copy of column 1 and 2 from the selected ListView
>item.
>
>
>
>The user has Thai as the selected language in the Windows regional &
>language settings / Advanced tab.
>
>
>
>Any ideas?
>
>
>
>Thanks,
>
>Ross.
>
>_______________________________________________
>Delphi mailing list -> Delphi@elists.org
>http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
Regards,
Sid Gudes
PIA Systems Corporation
sid.gu...@piasystems.com
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
Regards,
Sid Gudes
PIA Systems Corporation
sid.gu...@piasystems.com
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi