I'm trying to do localization in WiX installer. How can I fix the garbled words shown below in the installer properties? The language that I defined is Japanese.
Windows Installer doesn't officially support codepage 65001 for UTF-8 -- mostly because of UI problems like this. Try using codepage 932 for ja-JP strings. Also, make sure you're setting the Package/#SummaryCodepage attribute (the .wxl file's code page sets Product/#Codepage).
Related
I am trying to create an installer that support Russian language. I spent many times, but still did not fix the problem.
I have Windows 10 English version with installed Russian language pack. Russian language is set to default.
Here are my steps:
Install NSIS 3.01. (The same was with 2.46).
Build Examples\languages.nsi from NSIS. I use Windows XP as build PC.
When I run languages.exe on Window 10 and select Russian language I see the following:
The text is not in Russian.
Well it is probably in Russian, but in wrong font. Otherwise all text consist of question character (?).
With "Unicode true", the text is in Russian. But I would not like to use it and to understand the issue.
Regards,
Valery.
Unless you are still supporting Windows 95/98/ME there is no reason to not build a Unicode installer.
You must change the Language for non-Unicode programs to make non-Unicode version display the correct characters.
we have a application written in vb6, we also have the multilingual support for this application, we provide all the user message along with the ID's in .LNG file but application is not supporting the Unicode language like Japanese, Chinese etc.,can anyone suggest how to proceed the minimum change in the code and make this work !!!
Thanks
Standard VB6 controls doesn't support UNICODE. It is possible to use MS Forms controls (FM20.DLL). INFO: Usage and Redistribution of FM20.DLL.
The problem is that old version i buggy and is updated by MS-Office. New version of office id 64-bit and doesn't contain 32-bit FM20.DLL. I think it it only 'simple' way of implementing UNICODE but still it is massive change to the application.
Howerer VB6 supports different languages at least European, but the texts have to be properly encoded (Code Page Identifiers). I suppose that usual Windows font such as MS-San Serif, Arial supports most of languages.
If the windows default language is set properly other language characters should work. See e.g. HOW TO:Change language settings in Windows XP or try Japanese windows direclty.
I have an English version of the Windows XP operating system installed on my computer. If I try to use the Russian input language, for example, to give a form a caption that's written in Russian, the only thing I see is those unintelligible symbols that you often see when there is a problem with proper character encoding. Is there a way to make Delphi recognize Russian characters?
Any suggestions will be highly appreciated.
You can change default code-page used for programs that do not provide locale info (Control Panel > Regional setting > Advanced) to your locale (Russian).
As for SQL that is a separate question probably solved by SQL DB settings.
P.S. I would suggest you to move to Unicode version of Delphi (XE) and SQL too.
I am currently converting a legacy system to a new platform and need to extract strings from the old systems resource files.
The old system was written in Delphi and the strings are kept in files called .dfm. I have no trouble locating the strings and for English and other European languages there is no problem. The trouble comes when I try to extract strings in Japanese. I have used Notepad++ and it seems to me that the program don´t recognice the correct encoding. I get Japanese symbols but they don´t seem to match what is in the GUI. Notepad++ shows signs in something called GB2312(Simplified Chinese). But it looks weird.
My question is, does anyone have any tips on programs/text editors that are good at operations like this?
Also I'm grateful for any tips that might help me along the way.
Assuming that your issue is simply that Notepad++ is incorrectly guessing the encoding you can solve the problem by manually setting the encoding in Notepad++, like this:
Notepad++ itself already handles encoding issues. To make it to desired encoding, like Unicode;
first, copy all the contents of the file,
choose Unicode without BOM in the menu,
last, replace all contents with copied contents
save the file
Your contents will then be in your desired encoding.
Strings are kept not [just] in DFMs in Delphi. Only forms and associated text are. So you would to review all the code as well.
As for DFMs - before Delphi 2009 DFMs didn't use Unicode so you must know what charset was used. That was one of big problems with localization and internationalization of Delphi applications.
Delphi 2009 sets the default file format for new source code files to ANSI, this makes the source code platform-dependent.
Even for a new XSD file created in the IDE, which by default starts with this line
<?xml version="1.0" encoding="UTF-8" ?>
Delphi sets the file format to ANSI (this looks like a bug, for new XML and XSLT documents UTF8 is selected by default).
Is there a hidden option to set the default file format for source code files?
In fact this blog post from 2004 mentions a hidden IDE option.
It states that you can set a default file filter in the registry to make UTF-8 the default encoding in Delphi 8. This still works under Tokyo! Clearly, you have to adapt the path of the registry key to recent versions like this:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Embarcadero\BDS\19.0\Editor]
"DefaultFileFilter"="Borland.FileFilter.UTF8ToUTF8"
After setting this value Delphi will encode new units in UTF-8 with BOM.
Right-click on your source code in the Delphi 2009 IDE, and select File Format. Then choose UTF-8. Hope that helps.
Although the answer from MBulli should be still relevant, since version 10.4 of Delphi (as far as I remember) it is possible to change the default encoding within the IDE.
Go to Tools > Options and choose User interface > Editor from the navigation area.
You will find the Default file encoding setting down below.
If you install UTF8ize Plugin (english translation of his page & latest version) to your IDE, when you edit any file within the IDE, the plugin set the file's codepage to UTF8 automatically.
(FYI: The author creates many useful plugins. I posted some of his plugins with image here, but my post was deleted by the modelator. I just wanted to know his useful plugins, but yes, it's off topic here. sorry.)
AFAIK, there is no IDE-wide setting for specifying the default file format.