Index: psd-load.c
===================================================================
--- psd-load.c	(revision 22835)
+++ psd-load.c	(working copy)
@@ -1195,13 +1195,13 @@
     {
       (*offset) += strlen (layer->name);
       IFDBG printf("\t\t\t\t\t\tLAYER NAME: '%s'\n", layer->name);
-      layer->name = sanitise_string (layer->name);
-
       /* Layer name string lengths are padded to be divisible by 4 */
       numpadchars = 4-((1+strlen(layer->name)) % 4);
       if (numpadchars == 4)
         numpadchars = 0;
 
+      layer->name = sanitise_string (layer->name);
+
       if (numpadchars)
       {
         throwchunk (numpadchars, fd, "layer record extra data block throw");
@@ -3074,8 +3074,7 @@
 
   tmpunichunk[len]=0;
 
-  tmpchunk = g_convert ((gchar *) tmpunichunk, len * 2, "UTF-8", "UCS-2",
-                        NULL, NULL, NULL);
+  tmpchunk = g_utf16_to_utf8 (tmpunichunk, len, NULL, NULL, NULL);
 
   g_free (tmpunichunk);
 
