Fixed small bugs in several .po files, enabling these translations to
[xboard.git] / po / strip-bad-utf8.pl
diff --git a/po/strip-bad-utf8.pl b/po/strip-bad-utf8.pl
new file mode 100755 (executable)
index 0000000..e282ad7
--- /dev/null
@@ -0,0 +1,14 @@
+#! /usr/bin/perl
+#
+# Strip off utf8 encoding that was spuriously applied to a string of
+# 8-bit bytes.  Note: This may be totally bogus.  If you get any "Wide
+# character in print" messages, then the input was not a string of
+# 8-bit bytes that had utf8 encoding applied to it -- the message
+# means that utf8 decoding produced some characters > 0xff.
+
+binmode STDIN, ':encoding(UTF-8)';
+binmode STDOUT, ':raw';
+
+while (<>) {
+    print $_;
+}