Fix strange characters and pango warnings with LC_ALL=fr@euro. Patch & testing by...
[synfig.git] / synfig-core / trunk / src / tool / main.cpp
index 2fc8640..fbff491 100644 (file)
@@ -1125,6 +1125,7 @@ int main(int argc, char *argv[])
 
 #ifdef ENABLE_NLS
        bindtextdomain("synfig", LOCALEDIR);
+       bind_textdomain_codeset("synfig", "UTF-8");
        textdomain("synfig");
 #endif
 
@@ -1175,7 +1176,14 @@ int main(int argc, char *argv[])
 
                        // Open the composition
                        String errors, warnings;
-                       job_list.front().root=open_canvas(job_list.front().filename, errors, warnings);
+                       try
+                       {
+                               job_list.front().root=open_canvas(job_list.front().filename, errors, warnings);
+                       }
+                       catch(runtime_error x)
+                       {
+                               job_list.front().root = 0;
+                       }
 
                        if(!job_list.front().root)
                        {