[MacPorts] #50386: Glib error gives Invalid byte sequence in conversion input

MacPorts noreply at macports.org
Wed Jan 20 23:30:59 PST 2016


#50386: Glib error gives Invalid byte sequence in conversion input
--------------------------+-----------------------------------
  Reporter:  m.rick@…     |      Owner:  macports-tickets@…
      Type:  defect       |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.3.4
Resolution:               |   Keywords:  glib,dbus,glibmm,glom
      Port:  glibmm,glom  |
--------------------------+-----------------------------------

Comment (by murrayc@…):

 It seems to be a failure to convert the (probably) UTF-8 error message to
 the current locale's encoding, during the implicit conversion that happens
 here, in document.cc's get_file_display_name(), when writing to std::cerr:

   try
   {
     file_info = file->query_info(G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
   }
   catch(const Glib::Error& ex)
   {
     std::cerr << G_STRFUNC << ": uri=" << uri << "): error: " << ex.what()
 << std::endl;
     return result;
   }

 That is strange. Maybe it's because the error message contains a badly-
 encoded URI (based on a badly-encoded filepath?) for some reason.

 I guess we'd first want to know why Gio::File::query_info() fails the
 first time. The error message's explanation seems to be just "0", which is
 itself strange. I guess that something is odd about glib or the locale. I
 think this might need someone to debug the actual code as it happens.

-- 
Ticket URL: <https://trac.macports.org/ticket/50386#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list