linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05089
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2770: Unicode NSIS requires utf16le files, not utf8
------------------------------------------------------------
revno: 2770
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2011-12-29 14:31:38 +0100
message:
Unicode NSIS requires utf16le files, not utf8
modified:
installer/DCPlusPlus.nsi
installer/SConscript
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'installer/DCPlusPlus.nsi'
Binary files installer/DCPlusPlus.nsi 2011-10-06 18:58:07 +0000 and installer/DCPlusPlus.nsi 2011-12-29 13:31:38 +0000 differ
=== modified file 'installer/SConscript'
--- installer/SConscript 2011-07-03 16:15:56 +0000
+++ installer/SConscript 2011-12-29 13:31:38 +0000
@@ -55,7 +55,7 @@
# gather the files necessary to create the installer
sources = Glob('*.*')
reg = re.compile('^\W*File.+"([^"]+)"')
-f = codecs.open('DCPlusPlus.nsi', 'rb', 'utf_8')
+f = codecs.open('DCPlusPlus.nsi', 'rb', 'utf_16_le')
for line in f:
match = reg.search(line)
if match:
@@ -79,7 +79,8 @@
dir_cleaner = scoped_cmd(lambda: env.Execute(Delete(build_dir)))
# the file, included by the installer, that lists all available translations
- f_i18n = codecs.open(build_path + 'i18n.nsh', 'wb', 'utf_8')
+ f_i18n = codecs.open(build_path + 'i18n.nsh', 'wb', 'utf_16_le')
+ f_i18n.write(unicode(codecs.BOM_UTF16_LE, 'utf_16_le'))
# copy the source files to the build directory
for node in source:
@@ -108,7 +109,8 @@
# translate our strings
env.Execute(env['po4a_cmd']('po4a-translate', '-m "installer/Strings.xml" -l "' + xml_file + '" -p "' + nixify(str(node)) + '" -k 0'))
# parse translated strings to generate a message catalog included by i18n.nsh
- f_nsh = codecs.open(build_path + '_' + name + '.nsh', 'wb', 'utf_8')
+ f_nsh = codecs.open(build_path + '_' + name + '.nsh', 'wb', 'utf_16_le')
+ f_nsh.write(unicode(codecs.BOM_UTF16_LE, 'utf_16_le'))
f_nsh.write('!insertmacro LANGFILE_EXT "' + name + '"\n')
dom = parse(xml_file)
for elem in dom.firstChild.childNodes: