Localization char set problem

Got a problem you cannot solve? Try here.
Post Reply
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Localization char set problem

Post by yosilevy »

Hi,

A localization font issue - as installaware seems to be using ansi for localized strings on computers in which the default charset for non-unicode is wrong, the text shows up garbled.

I tried adding to the MIAF a line such as :

IF (lblLanguage.Caption = Hebrew) THEN Label1.Font.Chatset := HEBREW_CHARSET;

but it seems to be ignored.

What is the right syntax for this?
If this can't work then what's my alternative - I can't build a different set of dialogs just because of this...

Much appreciated.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Localization char set problem

Post by MichaelNesmith »

Chatset or Charset?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Right you were. Spelling mistake.

This is the correct line but it still doesn't work:
IF (lblLanguage.Caption = Hebrew) THEN Label1.Font.Charset := ANSI_CHARSET;

Should the ANSI_CHARSET be in quotes? Are multi-level (Font.Charset) properties supported?

What do you recommend?
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Anyone?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Localization char set problem

Post by MichaelNesmith »

Did you try the ANSI_CHARSET on the form first to make sure it works correctly - so we know what the correct property to set is before checking if sub properties are supported?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Since I couldn't find a way to modify form properties (as per my previous posts about BidiMode), I tried to set each individual control's charset...

Not sure If I got you - setting Charset to ANSI_CHARSET produces the bad result on machines in which the right Charset IS set. Not sure why but the only reliable way is to set it to hebrew which works on both machines that have it set and not-set.

I'm hoping you'll come back with a solution to setting the sub-properties.

Thanks for your help.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Localization char set problem

Post by MichaelNesmith »

Did you also try DEFAULT_CHARSET?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

That was the initial default setting. To sum it up:

DEFAULT_CHARSET works fine on all machines in which the non-unicode charset is set to the target language (hebrew). This also shows english fine off course.

ANSI_CHARSET doesn't work properly on the machines for which DEFUALT_CHARSET does.

HEBREW works for both.

Is this in anyway related to the encoding of the translation files? Can I somehow produce unicode strings and be done with it?

We're releasing tomorrow. Please help.e

Thanks.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Localization char set problem

Post by MichaelNesmith »

You cannot use Unicode, I'm afraid. To support Win9X-Win2008R2 with a single setup binary, we have to use ANSI.

The easiest way to quickly fix this for you would be to duplicate your dialogs and add them all to your project, showing the HEBREW versions when applicable.

This will get the job done with zero overhead.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Sounds good but please enlighten me how do I duplicate the dialogs (that's easy - I know the files) and link them to the project? Currently I have batch files that build with the /l parameter (if I remember correctly) that sets the language... I'd like to keep my build process intact.

Thanks again.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: Localization char set problem

Post by MichaelNesmith »

Create a copy of all the files ending in extension .dfm and .dfm.miaf and .dfm.baggage,
Rename them all consistently to whatever you like,
Add them all to your project using the Project Manager / Dialogs node,
Update your Display Dialog statements to display the correct set of dialogs based on the value of the LANGUAGE variable.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Sounds good. Will do and let you know.
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

:-(

After having done this, I learned that all is well except for the buttons. These don't obey the new character set setting of HEBREW_CHARSET. I've tried every font. Works perfectly for all other controls except buttons.

Any ideas?
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Nevermind previous post - it doesn't work but we just notify the user to go fix it in Control Panel and that's it.

Another problem is that now, even when building in English, all UI is in English but popup message such as "Are you sure you want to cancel?" pops up in hebrew...

This is not an OS question off course so what's causing this?

Thanks.
yosilevy
Posts: 25
Joined: Fri Jan 23, 2009 3:31 am

Re: Localization char set problem

Post by yosilevy »

Any ideas?
Post Reply