[Poppler-bugs] [Bug 5952] New: GooString::getCString returns UTF-8 with prepended UTF-16 BOM

bugzilla-daemon at annarchy.freedesktop.org bugzilla-daemon at annarchy.freedesktop.org
Sun Feb 19 05:33:51 PST 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=5952          
     
           Summary: GooString::getCString returns UTF-8 with prepended UTF-
                    16 BOM
           Product: poppler
           Version: unspecified
          Platform: PC
               URL: http://www.universetoday.com/365days.pdf
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: general
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: chpe at gnome.org


Originally filed as evince bug http://bugzilla.gnome.org/show_bug.cgi?id=326129 .

With the testcase PDF [http://www.universetoday.com/365days.pdf], some page
labels contain data like this:

Breakpoint 2, poppler_page_get_property (object=0x83da148, prop_id=1,
value=0xbf8382e8, pspec=0x82b7938) at poppler-page.cc:753
753           g_value_set_string (value, label.getCString());
(gdb) x /4x label.s
0x83d9d30:      0xfe    0xff    0x69    0x00

i.e. this is an UTF-8 string with prepended UTF-16 BOM !

The code in glib/poppler-page.c is:
GooString label;
page->document->doc->getCatalog ()->indexToLabel (page->index, &label);
g_value_set_string (value, label.getCString());          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Poppler-bugs mailing list