Mega Search
23.2 Million


Sign Up

Make a donation  
Menu items in Chinese get extra letters added, why (XE5)?  
News Group: embarcadero.public.delphi.language.delphi.general

I do'nt know if this is an IDE or other issue but I start out here
anyway...

I have now upgraded an application to XE5 from D2007 in order to apply
unicode to language text handling.
Most of that seems to work OK now, but there is one item that I don't
know why it happens:

Whenever I load menu item captions from an UTF-8 language file in
Chinese (both simplified and traditional) they show up with extra
letters in parenthesis added at the end of the captions.
It is like this:
XXXX(Z)  XXXX(Y) XXXX(W)
etc, where XXXX are placeholders for chinses characters, which display
just fine as far as I can tell.

Is there some way these extra latin characters can be switched off?
Maybe a property of the menu object or something like that?
And how did they get there in the first place, they are definitely not
part of the language files?

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 3:16 AM EST
From: Bo Berglund
 
Re: Menu items in Chinese get extra letters added, why (XE5)  
News Group: embarcadero.public.delphi.language.delphi.general
On Mon, 19 Jan 2015 14:57:18 -0800, Bo Berglund
 wrote:

>On Mon, 19 Jan 2015 13:07:00 -0800, Remy Lebeau (TeamB)
> wrote:
>
>>Can you provide an actual screenshot?
>
>I will as soon as the stupid program has finished running a test I set
>up.

Had to kill the program using Task Manager, it never got to the end...
Tried the D2007 version next on the same dataset - took 8 seconds.

Anyway I have now uploaded a screenshot to the attachments forum

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 3:19 PM EST
From: Bo Berglund
 
Re: Menu items in Chinese get extra letters added, why (XE5)  
News Group: embarcadero.public.delphi.language.delphi.general
On Mon, 19 Jan 2015 13:20:59 -0800, Just JJ 
wrote:

>> And how did they get there in the first place, they are definitely not
>> part of the language files?
>
>The appended "(X)" text is the auto added menu hotkey if the menu text
>doesn't contain any hotkey-usable characters. The behaviour is defined by
>the "AutoHotkeys" proprety of the menu item container component (e.g.
>TMainMenu or TPopupMenu), which is set to maAutomatic by default. Set it to
>maManual to disable the auto hotkey generation.

Thanks for the explanation! I bet this is it and will try as soon as I
have been able to get past the current display issue.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 2:59 PM EST
From: Bo Berglund
 
Re: Menu items in Chinese get extra letters added, why (XE5)  
News Group: embarcadero.public.delphi.language.delphi.general
On Mon, 19 Jan 2015 13:07:00 -0800, Remy Lebeau (TeamB)
 wrote:

>Can you provide an actual screenshot?

I will as soon as the stupid program has finished running a test I set
up. Somehow it has screwed up in the graphics processing, because
during data inversion it seems to redraw all the graphics seemingly
every time it loops in the inner loop. Result is an insanely blinking
screen and extremely slow processing. A data file thta usually takes
about 1-2 seconds to process has now been running for about 15 minutes
and is only half way through.
It is crazy, especially since there is no sign of such behaviour when
the program is running in D2007. The changes I had to do in order to
get GLScene to install in XE5 were contained in a single file in
GLScene and dealt with DLL interfaces using ANSI rather than Unicode.
But apart from that and the TMemInifile usage you suggested for
loading the language strings (which now works) nothing has changed in
the application code....

So I can only suspect that some differences exist between D2007 and
XE5 in the handling of events (I believe that some of the redrawing is
triggered by some change event somewhere).

Anyway I believe that Just JJ gave the correct answer concerning menu
hotkeys. As soon as this crazy show ends I will test if setting the
AutoHotKeys:=false will solve the issue.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 2:57 PM EST
From: Bo Berglund
 
Re: Menu items in Chinese get extra letters added, why (XE5)  
News Group: embarcadero.public.delphi.language.delphi.general
On Mon, 19 Jan 2015 03:16:25 -0800, Bo Berglund wrote:
> I do'nt know if this is an IDE or other issue but I start out here
> anyway...
> 
> I have now upgraded an application to XE5 from D2007 in order to apply
> unicode to language text handling.
> Most of that seems to work OK now, but there is one item that I don't
> know why it happens:
> 
> Whenever I load menu item captions from an UTF-8 language file in
> Chinese (both simplified and traditional) they show up with extra
> letters in parenthesis added at the end of the captions.
> It is like this:
> XXXX(Z)  XXXX(Y) XXXX(W)
> etc, where XXXX are placeholders for chinses characters, which display
> just fine as far as I can tell.
> 
> Is there some way these extra latin characters can be switched off?
> Maybe a property of the menu object or something like that?
> And how did they get there in the first place, they are definitely not
> part of the language files?

The appended "(X)" text is the auto added menu hotkey if the menu text
doesn't contain any hotkey-usable characters. The behaviour is defined by
the "AutoHotkeys" proprety of the menu item container component (e.g.
TMainMenu or TPopupMenu), which is set to maAutomatic by default. Set it to
maManual to disable the auto hotkey generation.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 1:20 PM EST
From: Just JJ
 
Re: Menu items in Chinese get extra letters added, why (XE5)  
News Group: embarcadero.public.delphi.language.delphi.general
Bo wrote:

> Whenever I load menu item captions from an UTF-8 language file
> in Chinese (both simplified and traditional) they show up with extra
> letters in parenthesis added at the end of the captions.
> It is like this:
> XXXX(Z)  XXXX(Y) XXXX(W)
> etc, where XXXX are placeholders for chinses characters, which
> display just fine as far as I can tell.

Can you provide an actual screenshot?

-- 
Remy Lebeau (TeamB)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 1:07 PM EST
From: Remy Lebeau (TeamB)