[Bug 740784] subparse: fails to detect UTF-8 encoding

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Nov 30 07:23:29 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=740784
  GStreamer | gst-plugins-base | git

--- Comment #11 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2014-11-30 15:23:27 UTC ---
Two more thoughts:

a) the incoming data might be UTF-16 or UTF-32. In this case trailing NULs are
2 bytes or 4 bytes, and removing a single NUL byte at the end would might a
character in half. This is an argument for doing the trimming of NULs just
before the gst_utf8_validate() and not earlier.

b) there could be multiple trailing zeroes

So how about a while (len > 0 && str[len-1] == '\0') --len just before the
_validate()?

-- 
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