try alternate Glib:: API for conversion from UTF-8 to ascii in Mackie support code
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 15 Dec 2014 20:06:10 +0000 (15:06 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 15 Dec 2014 20:06:10 +0000 (15:06 -0500)
libs/surfaces/mackie/strip.cc

index cfb4592f80c8fbe5ec3665824ed47eeca46e304b..70a7cb90fd5eb0efd9ae980b52a25672769ea8b8 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <sys/time.h>
 
-#include <glib.h>
+#include <glibmm/convert.h>
 
 #include "midi++/port.h"
 
@@ -758,7 +758,7 @@ Strip::display (uint32_t line_number, const std::string& line)
        retval << (_index * 7 + (line_number * 0x38));
        
        // ascii data to display. @param line is UTF-8
-       string ascii = g_str_to_ascii (line.c_str(), 0);
+       string ascii = Glib::convert_with_fallback (line, "UTF-8", "ISO-8859-1", "_");
        string::size_type len = ascii.length();
        if (len > 6) {
                ascii = ascii.substr (0, 6);