Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

UTF-8 filenames not being recognized correctly.

Hello everyone!

I'm working on an installer that needs to package a few files with UTF-8 names (japanese characters). We don't need the installer to show any of the dialogs in any language other than English, but we need those files to be correctly installed. At the moment, they are installed, but the filenames don't show up correctly (we get those little squares that we would get in a computer without support for UTF filenames).

Is there any way to make Advanced Installer handle these UTF-8 filenames appropiately?

Thanks,

Stella
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Stella,

Here is what you can do:

Copy the English dictionary (ui_en.ail) from AI working folder to your project folder. In this dictionary replace:

Code: Select all

<DICTIONARY type="singlelanguage" lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="dictionary.xsd">
with:

Code: Select all

<DICTIONARY type="singlelanguage" lang="ja" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="dictionary.xsd">
Now add this dictionary to your project (in "Translations" page, "Dictionaries" tab) first in the dictionaries list.

Save and reload your project. Build.

This implies to start the project with Japanese language as project language.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Hi gigi!

Thanks for the quick reply. I tried what you suggested in your post: I copied ui_en.ail across to my working folder and modified it. Then I added it to the project in the language section, as first dictionary to be used. I rebuilt the project, but it stills seems to be failing to behave appropiately: any file that it packages that has japanese characters in the name appears as "no font squares" after the installation. The strangest thing is that the files are picked up correctly, we just reviewed the Files and Folder section and that shows the appropiate name.

Did I miss any steps to make this work?

Thanks in advance,
Stella
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Some more information,

We've been going through the aip project in a text editor, and even though the file appears to be unicode (<?xml version="1.0" encoding="UTF-8" standalone="yes"?>) the filenames it shows are not correct. We tried replacing them with the proper japanese names and recompiling the project, but this caused Advanced Installer to fail to open the project, complaining about the junk equivalent of one of the japanese strings not being a valid string for a file name.

Is there any way to tell Advanced Installer to save the project files in real UTF-8 so that this doesn't happen? It really looks like the cause of the problem we're seeing.

Thanks very much!
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Stella,

I test this on my computer and the files are installed correctly with Japanese names.

Are you sure that you reload the project after you add that dictionary? Also please make sure you have Japanese fonts installed on your computer to see them correctly.
Is there any way to tell Advanced Installer to save the project files in real UTF-8 so that this doesn't happen?
The AIP project of Advanced Installer is saved as UTF-8. Maybe your test editor does not know to open the AIP file as UTF-8.

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Hi Gigi,

Thanks for your reply. I tried once again, and it still doesn't install files with japanese names correctly. Maybe I'm missing some steps:

- When you say "reload the project", what exactly do you mean? I just save the changes and rebuild, I would expect that to be enough to pick up any changes. I haven't seen any "reload" option in any menu.
- When you said in your first reply
This implies to start the project with Japanese language as project language.
what exactly did you mean? Adding Japanese as one of the available languages, so that the project is also built in Japanese? If that's the case, I'm afraid that is not what we need to do: we need a project in English to successfully copy files with japanese filenames.

Thanks in advance for your help,

Stella
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
When you say "reload the project", what exactly do you mean?
What I meant to say is to close the project then open it again.
Adding Japanese as one of the available languages, so that the project is also built in Japanese?
When you create the project select the "Japanese" as project language. The dictionary I told you to add is the English dictionary so the UI can be displayed is English.

Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

I'll give that another try, let's see if I get it right now. Is there any way to change the project language once the project has been created? We already have all the project set up, wouldn't like to have to start again...

Thanks!

Stella
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Stella,

I'm afraid that the based project language can not be changed on the fly. It can be selected only when the project is created.

But you can try this:

Open the AIP manually with a text editor and replace (Language="en") to (Language="ja") and:

Code: Select all

<ROW Property="ProductCode" Value="1033:{The GUID ...} "/>.
to:

Code: Select all

<ROW Property="ProductCode" Value="1041:{The GUID ...} "/>
Please let me know if this works.

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Hi Gigi,

I tried changing the project language, and I can't find any line on the project file containing

Code: Select all

ROW Property="ProductCode" 
. I tried building the project after just replacing language="en" with language="ja" and, although it build ok, when i try to run it i get an error code 2502 that I can't really make sense of.

Any suggestions?

Thanks,
Stella
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

You must do this change:

Code: Select all

<ROW Property="ProductCode" Value="1033:{0F989C21-956A-4D26-AF6B-62E7BB1F9515} "/>
to:

Code: Select all

<ROW Property="ProductCode" Value="1041:{0F989C21-956A-4D26-AF6B-62E7BB1F9515} "/>

Code: Select all

<ROW Property="ProductCode" Value="1033:{0F989C21-956A-4D26-AF6B-62E7BB1F9515} "/>
This line resides at the beginning of the AIP file in the "caphyon.advinst.msicomp.MsiPropsComponent" section.

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Hi again,

That worked (at last!!!), although I had to paste that line from a previous version of the project file. Thanks very much for that!

The only problem I have now is that the first window that appears before the first dialog of the installer appears in japanese... I guess that has to do with dictionaries, but I can't really find the strings that are missing in my customized "english strings in a japanese dictionary", but I can't really find which are missing. Any clue about this? Is my assumption correct?

Thanks in advance!

Stella
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Some more information...

It is failing to show two of the small windows properly. The first one is meant to be:
Title: Setup
Text: Chekcing integrity (MD5)

The second one is meant to be:
Title: [Product name] Setup
Text: Extractying the main application files...

I've been looking for those strings in the english dictionary file, and I can't find them. The problem is that if I compile the project with english as base language, these windows show ok, but if I compile it in japanese (which I need in order to get the files with japanese names to be copied correctly), they appear with just question marks.

Also there is a third small screen that appears before the "Welcome to [Product Name] Setup wizard, which appears in japanes.

Any idea how to get all that to show up in English?

Thanks again!
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I'm afraid that the UI of the Bootstapper can not be set to English for a project that is in "Japanese". What I was suggesting you with the MSI file was a little hack since Windows Installer does not support this. If you want files in "Japanese" you must create a project in "Japanese".

But I don't understand why you need your package in English and two files in "Japanese"?

Kind Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Stella
Posts: 20
Joined: Thu Oct 05, 2006 4:33 pm

Hi,

Well, the thing is that a few of the files the product needs (mainly used when doing demos to customers) are in japanese, and they would need to be installed with the correct japanese filename even if the project is in English. But apparently this can't be done...

Anyway, thanks for all your help

Stella

Return to “Common Problems”