aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/game
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 20:18:17 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 20:18:17 +0000
commit7a74241f286d875d8663330e3f3033a69c8e3f41 (patch)
tree8d8a9bb0d49d2c682651fcc17f2410d04160bd52 /unicode/game
parentda300facd4d36730c3bbf69940d57e750b1bc3e4 (diff)
downloadusdx-7a74241f286d875d8663330e3f3033a69c8e3f41.tar.gz
usdx-7a74241f286d875d8663330e3f3033a69c8e3f41.tar.xz
usdx-7a74241f286d875d8663330e3f3033a69c8e3f41.zip
language file conversion script added
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1903 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--unicode/game/languages/convert.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/unicode/game/languages/convert.sh b/unicode/game/languages/convert.sh
new file mode 100644
index 00000000..fc320a7f
--- /dev/null
+++ b/unicode/game/languages/convert.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# See: http://www.microsoft.com/resources/msdn/goglobal/default.mspx?OS=Windows%20Vista
+
+function convertUTF8 {
+ if [ ! -f $2.ini ]; then
+ echo "skip $2.ini: does not exist"
+ return
+ fi
+
+ # UTF-8 BOM (0xEF 0xBB 0xBF)
+ BOM=`echo -n -e "\0357\0273\0277"`
+ HEADER=`head -c3 $2.ini`
+ if [ $HEADER != $BOM ]; then
+ echo "Convert $2.ini from $1 to UTF8"
+ echo -n $BOM >$2.tmp
+ iconv -f $1 -t UTF-8 $2.ini >>$2.tmp
+ mv $2.tmp $2.ini
+ else
+ echo "skip $2.ini: already UTF8"
+ fi
+}
+
+convertUTF8 CP1252 Catalan
+convertUTF8 CP1252 French
+convertUTF8 CP1252 Italian
+convertUTF8 CP1252 Spanish
+convertUTF8 CP1250 Croatian
+convertUTF8 CP1252 Euskara
+convertUTF8 CP1252 German
+#convertUTF8 UTF-8 Japanese
+convertUTF8 CP1252 Swedish
+convertUTF8 CP1252 Dutch
+convertUTF8 CP1252 Finnish
+convertUTF8 CP1253 Greek
+convertUTF8 CP1252 Portuguese
+
+convertUTF8 CP1252 Danish
+convertUTF8 CP1252 Norwegian
+#convertUTF8 CP1251 Serbian
+convertUTF8 CP1250 Serbian
+convertUTF8 CP1250 Slovenian
+convertUTF8 CP1250 Polish
+convertUTF8 CP1250 Slovak