summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/xine-engine/osd.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d22cd332..72b15623a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ xine-lib (1-rc4)
* preliminary matroska support
* support for AAC audio in RealMedia files
* implement chapter skipping in ogm files
+ * fix endianness problem in OSD texts (using UCS-2LE or UCS-2BE encoding)
xine-lib (1-rc3a)
* new subtitle formats: jacobsub, subviewer 2.0, subrip 0.9
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index cb638128b..70213606a 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -74,6 +74,13 @@
*/
#define ALIAS_CHARACTER_FONT '_'
+/* we want UCS-2 encoding in the machine endian */
+#ifdef WORDS_BIGENDIAN
+# define UCS2_ENCODING "UCS-2BE"
+#else
+# define UCS2_ENCODING "UCS-2LE"
+#endif
+
#ifdef MAX
#undef MAX
#endif
@@ -891,9 +898,9 @@ static int osd_set_encoding (osd_object_t *osd, const char *encoding) {
}
/* prepare conversion to UCS-2 */
- if ((osd->cd = iconv_open("UCS-2", encoding)) == (iconv_t)-1) {
+ if ((osd->cd = iconv_open(UCS2_ENCODING, encoding)) == (iconv_t)-1) {
xprintf(osd->renderer->stream->xine, XINE_VERBOSITY_LOG,
- _("osd: unsupported conversion %s -> UCS-2, no conversion performed\n"), encoding);
+ _("osd: unsupported conversion %s -> %s, no conversion performed\n"), encoding, UCS2_ENCODING);
return 0;
}