Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#199 closed defect (wontfix)

Special characters broken with bitmap fonts

Reported by: DomanR@… Owned by: alex@…
Priority: normal Component: vf
Version: HEAD Severity: normal
Keywords: Cc: superandrzej@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I use Xbox Media Center, which plays video files with MPlayer. At first I
reported this bug on XBMC project (you can see details on
http://sourceforge.net/tracker/index.php?func=detail&aid=1070468&group_id=87054&atid=581838),
but they sugested me it will be MPlayer bug.

I'm having problems with displaing polish letter in
subtitles properly. Instead of them I get underlines
or strange characters. The problem concerns Matroska files
with build-in subtitles. Everything works fine
on OGM files (with build-in subs also), as well as on other
videos and subs in loaded from text files.

Matroska movie I made using some AVI file and added subs
from included Subtitle.srt file,
with mkvtoolnix-1.0 program. I've checked "pol (Polish)" in
Language field.

Then I made OGM file with direct stream using VirtualDubMod?
(no changes, just "Save as..." and choose OGM file).

Subtitles are displayed properly on my polish WindowsXP in
Media Player Classic.

On XBMC is different. I have checked all combinations of
fonts and charset, and still can't get polish letters
in Matroska files :(

Under www.domanr.neostrada.pl/1070468_movies.rar and
www.domanr.neostrada.pl/1070468_screenshots.rar I put example files and also
some screenshots, to make it easier, what I'm talking about.

I tried MPlayer v1.0pre6 (using CVS on 11th of Jan 2005), and previous
MPlayer v1.0pre5 (from Xbox Media Center package). Problem occurs on both versions.

Attachments (1)

fix_unicode (259 bytes) - added by reimar 14 years ago.
auto-fix .desc files

Download all attachments as: .zip

Change History (19)

comment:1 Changed 14 years ago by reimar

Did you try the -subcp option?

comment:2 Changed 14 years ago by DomanR@…

Well I did not. There is no way to use any options under Xbox.

As far as I know the Matroska container should choose subtitles code page
automaticly, under each enviroment (for example chineese letters even on english
Windows). For me it seems more like Central Europe code page is being detected
not properly, or is being set not properly.

comment:3 Changed 14 years ago by reimar

(In reply to comment #2)

Well I did not. There is no way to use any options under Xbox.

Can't you put it in a (e.g. per-file) config file?
And when you said you tried all charsets, did you try utf8? according to the
specs it will be converted to automatically UTF8 before it is inserted, but then
I think it should work with MPlayer...

comment:4 Changed 14 years ago by DomanR@…

I just tried UTF-8. No changes.

I can try with those config files, though I have to search a little, as I don't
know how so far :) Just to be sure, you mean a config file for each movie, in
the same folder?

Even if it would work, it shouldn't be this way I think. Because what if I will
get a movie on CD/DVD from somebody and there won't be config file? That's what
Matroska was made for. Work in every enviroment in the same way. I still think
that it is some problem with proper code page recognition, as all these movies
works fine under Media Player Classic in WindowsXP.

comment:5 Changed 14 years ago by reimar

(In reply to comment #4)

I can try with those config files, though I have to search a little, as I don't
know how so far :) Just to be sure, you mean a config file for each movie, in
the same folder?

Well, I thought that might be easier, but changing the global config file would
be okay, too. I'd just like to find out which codepage it is using...

Even if it would work, it shouldn't be this way I think. Because what if I will
get a movie on CD/DVD from somebody and there won't be config file? That's what
Matroska was made for. Work in every enviroment in the same way. I still think
that it is some problem with proper code page recognition, as all these movies
works fine under Media Player Classic in WindowsXP.

Yes, sure. But I can't fix it unless I know what's wrong. Maybe you should
upload a (small) sample to ftp://mplayerhq.hu/MPlayer/incoming

comment:6 Changed 14 years ago by DomanR@…

Sorry for little delay.

My sample files you can download from:

www.domanr.neostrada.pl/1070468_movies.rar
www.domanr.neostrada.pl/1070468_screenshots.rar

I've uploaded them on your FTP as well. They are under "domanr_movies.rar" and
"domanr_screenshots.rar" names.

comment:7 Changed 14 years ago by reimar

Well, for me it's exactly opposite, the mkv works, but the ogm works only with
-subcp cp1250
I guess that's because I'm using a ttf font for MPlayer.

comment:8 Changed 14 years ago by reimar

The problem is that the bitmap fonts do not provide a mapping for unicode.
You can add them by adding the font.desc file. The unicode number for the
character is already mentioned there - so what you would have to do is e.g.:
for the line
0x00ea 3680 3695; U+0119|ê
also add the line
0x0119 3680 3695; U+0119|ê

Do this for all characters and when you're finished send us a patch ;-)

comment:9 Changed 14 years ago by DomanR@…

I think I've got it. I've added mapping in one of font.desc files and it works
:) I'll try to map all characters from 0x0100-0x017f range, because I've seen
that MVK files with other languages (like Czech for example) have the same problem.

And what oneday I'd like to use ttf? Give me some hint where should I try to
make a change.

comment:10 Changed 14 years ago by reimar

(In reply to comment #9)

I think I've got it. I've added mapping in one of font.desc files and it works
:) I'll try to map all characters from 0x0100-0x017f range, because I've seen
that MVK files with other languages (like Czech for example) have the same

problem.

Yes, that would be best...

And what oneday I'd like to use ttf? Give me some hint where should I try to
make a change.

Several "solutions":
1) compiling with enca support will auto-detect (don't know how good) the
encoding of external subtitles
2) adding subcp = cp1250 to the (global) config should make all subtitles work
that use cp1250 as encoding, but Matroska (according to the spec) always uses utf8
3) add subcp = utf8 to the global config and make sure that all subtitles are
encoded with utf8 (you can use e.g. iconv to convert them)

comment:11 Changed 14 years ago by reimar

  • Summary changed from Problem with polish letters in Matroska movies to Special characters broken for subtitles in matroska

I changed the summary because this not only happens for polish chars (so people
will find it better when searching).
Btw: did you finish modifying the font.desc file? care to send/attach a patch
(create it with diff -u <original file> <modified file>).

comment:12 Changed 14 years ago by DomanR@…

I tried to, but I had some problems with compilations under Linux. And
unfortunately this is my exams time on university, so I'll have to leave it for
now. But as finish it, I'll report it here.

Stay tuned ;-)

Changed 14 years ago by reimar

auto-fix .desc files

comment:13 Changed 14 years ago by reimar

modified version of the script by Savchenko Andrew, should fix the font.desc
file automatically

comment:14 Changed 14 years ago by dominik@…

  • attachments.mimetype changed from application/octet-stream to text/plain

comment:15 Changed 14 years ago by dominik@…

I've fixed MIME type on that script. Anyway, can we close this as FIXED?

comment:16 Changed 13 years ago by reimar

  • Resolution set to wontfix
  • Status changed from new to closed
  • Summary changed from Special characters broken for subtitles in matroska to Special characters broken with bitmap fonts

Bug in bitmap fonts. They are deprecated nowadays anyway. Changed summary to
allow easier searching. Feel free to send in patches to fix the bitmap fonts
though.

comment:17 Changed 13 years ago by reimar

  • Cc superandrzej@… added

comment:18 Changed 13 years ago by reimar

* Bug 556 has been marked as a duplicate of this bug. *

Note: See TracTickets for help on using tickets.