Izpack is an open-source installation and production tool written in Java. The things made are basically quite satisfactory.
Many Chinese problems encountered during use are solved as follows:
1. garbled characters on the Chinese interface:
Modify CHN. xml. the encoding of this file is strangely transcoded, and it takes only a few days to complete the test. Edit the scrapbook page and evaluate it as follows:Code:
Java. Io. File F = New Java. Io. File ( " C: \ Program Files \ izpack \ bin \ langpacks \ Installer \ CHN. xml " );
Byte [] = New Byte [( Int ) F. Length ()];
New Java. Io. datainputstream ( New Java. Io. fileinputstream (f). readfully ();
New String ( New String ( New String (, " GBK " ). Getbytes (), " UTF-8 " ). Getbytes ( " ISO8859-1 " ))
In this case, you can use brute-force cracking to crack the garbled code. Generally, transcoding will not exceed three levels. In the future, you can use the following similar problems:
Static String [] encodings = { " GBK " , " ISO8859-1 " , " Big5 " , " SHIFT-JIS " ,
" UTF-8 " , " Unicode " } ;
Public Static Void Main (string [] ARGs) throws unsupportedencodingexception {
String Input = " Zookeeper " ;
For ( Int I = 0 ; I < Encodings. length; I ++ ) {
For ( Int J = 0 ; J < Encodings. length; j ++ ) {
For ( Int K = 0 ; K < Encodings. length; k ++ ) {
System. Out . Println ( New String ( New String (input
. Getbytes (encodings [I]), encodings [J])
. Getbytes (encodings [k])
+ " \ T "
+ Encodings [I]
+ " / "
+ Encodings [J]
+ " / "
+ Encodings [k]);
}
}
}
}
2. The menu is unavailable after installation.
You can see a garbled directory under document and Settings \ % Your account % \, so it is not displayed on the Start menu, and the reason is that it is not displayed on the desktop.
Cause: shortlink. dll does not use Unicode, so the Chinese read out is GBK, was mistakenly treated as ISO8859-1 transcoding.
Solution: Try to regetbytes the garbled string obtained in consumer link. Java and combine it. If any character is lost, there is a loss in the sample conversion.
Finally, we decided to use byte [] to pass the string. The Chinese characters read in the DLL are passed to Java in byte arrays. Java encoded the strings according to the system property Io. Encoding (GBK.
After two days of installation ~~~, But... The uninstall interface has a Chinese problem... Faint. If you have time, try again. It's a small problem.
Several tips:
1. In the shortcutspec. xml file of the menu configuration, if the specified XXX does not exist in <createforpack name = "XXX"/>, no error is reported and the menu is not installed.
2. If the executed file does not exist, the menu Creation screen will be slow. The shortcutpanel should be placed in the file and executed.
3. If the file does not exist during installation and there is no error prompt, the last file name on the screen should be faulty.
Download the patch file mentioned here: http://files.cnblogs.com/steeven/izpack3.7.2_chiese_patch.zip