[Bug 740784] subparse: fails to detect UTF-8 encoding
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Dec 3 20:44:09 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=740784
GStreamer | gst-plugins-base | git
Reynaldo H. Verdejo Pinochet <reynaldo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #291917|0 |1
is obsolete| |
--- Comment #20 from Reynaldo H. Verdejo Pinochet <reynaldo at opendot.cl> 2014-12-04 04:44:04 UTC ---
Created an attachment (id=292114)
View: https://bugzilla.gnome.org/attachment.cgi?id=292114
Review: https://bugzilla.gnome.org/review?bug=740784&attachment=292114
subparse: avoid false negatives dealing with UTF-8
OK. Turns out we were only looking at part of the problem.
Termination NULs are an issue, Granted. And these were already
been handled by my previous patch. But there's another condition
that wasn't been considered:
It might be that only part of the available data is be valid
UTF-8. For example a byte at the end might be the start of a
valid UTF-8 run (ie: d0 / 11010000) but not be a valid UTF-8
character by itself. In this case, we should consume only the
valid portion of the run.
This new patch addresses the whole issue as I see it. Quickly
drafted solution and I'm likely fine-tuning it tomorrow but
comments & testing welcome all the same. I tried out with the
samples I have and it works.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gstreamer-bugs
mailing list