[gstreamer-bugs] [Bug 172848] subtitles with special chars are displayed as "???????"

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Feb 20 02:57:35 PST 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=172848
 GStreamer | gst-plugins-base | Ver: HEAD CVS





------- Comment #8 from Tim-Philipp Müller  2006-02-20 10:57 UTC -------
It's not really feasible to detect the character encoding in .srt files, at
least not with a LOT of effort. Basically we can only detect 'valid UTF-8' or
not. If it's not valid UTF-8, it can be about anything else, but we don't know
what. The problem is that almost all other common character encodings use the
entire 8-bit range, so we can't know whether a text is, say, ISO-8859-15 or
ISO-8859-2 or whatever.

Also, we get fed text only in very small chunks, which makes detection even
harder.

I suppose what we can do is similar to what we do with character encodings in
ID3v1 tags:

  - check if it's UTF-8
  - if it's not UTF-8, check
      - whether a certain environment variable is set to force an encoding
      - if no encoding is forced on us, check what the current locale's
        charset is:
          - it it's non-UTF-8, assume it's that encoding
          - if it's UTF-8, assume ISO-8859-15


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list