diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2004-01-26 09:49:33 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2004-01-26 09:49:33 +0000 |
commit | f8f81c934670b611d102cc5f69dfbc519f74bed1 (patch) | |
tree | 6aac933b9567e29e24d1cc7a12aed49a1f66a95e | |
parent | df5fd22509e39c97d962d13811144caa1d6cc931 (diff) | |
download | xine-lib-f8f81c934670b611d102cc5f69dfbc519f74bed1.tar.gz xine-lib-f8f81c934670b611d102cc5f69dfbc519f74bed1.tar.bz2 |
It seems some older systems haven't UCS-2 encoding in the machine encoding. Force using UCS-2LE or UCS-2BE according to endianness.
CVS patchset: 6065
CVS date: 2004/01/26 09:49:33
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/xine-engine/osd.c | 11 |
2 files changed, 10 insertions, 2 deletions
@@ -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; } |