diff --git a/app/plug-in/plug-in-icc-profile.c b/app/plug-in/plug-in-icc-profile.c
index 110f68f..281c987 100644
--- a/app/plug-in/plug-in-icc-profile.c
+++ b/app/plug-in/plug-in-icc-profile.c
@@ -47,9 +47,10 @@
 
 static void
 plug_in_icc_profile_info_return (GValueArray  *return_vals,
-                                 gchar       **name,
                                  gchar       **desc,
-                                 gchar       **info);
+                                 gchar       **manufacturer,
+                                 gchar       **model,
+                                 gchar       **copyright);
 
 
 gboolean
@@ -143,9 +144,10 @@ gboolean
 plug_in_icc_profile_info (GimpImage     *image,
                           GimpContext   *context,
                           GimpProgress  *progress,
-                          gchar        **name,
                           gchar        **desc,
-                          gchar        **info,
+                          gchar        **manufacturer,
+                          gchar        **model,
+                          gchar        **copyright,
                           GError       **error)
 {
   Gimp          *gimp;
@@ -179,7 +181,7 @@ plug_in_icc_profile_info (GimpImage     *image,
       switch (status)
         {
         case GIMP_PDB_SUCCESS:
-          plug_in_icc_profile_info_return (return_vals, name, desc, info);
+          plug_in_icc_profile_info_return (return_vals, desc, manufacturer, model, copyright);
           break;
 
         default:
@@ -205,9 +207,10 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
                                GimpContext   *context,
                                GimpProgress  *progress,
                                const gchar   *filename,
-                               gchar        **name,
                                gchar        **desc,
-                               gchar        **info,
+			       gchar        **manufacturer,
+			       gchar        **model,
+			       gchar        **copyright,
                                GError       **error)
 {
   GimpProcedure *procedure;
@@ -238,7 +241,7 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
       switch (status)
         {
         case GIMP_PDB_SUCCESS:
-          plug_in_icc_profile_info_return (return_vals, name, desc, info);
+          plug_in_icc_profile_info_return (return_vals, desc, manufacturer, model, copyright);
           break;
 
         default:
@@ -261,28 +264,36 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
 
 static void
 plug_in_icc_profile_info_return (GValueArray  *return_vals,
-                                 gchar       **name,
                                  gchar       **desc,
-                                 gchar       **info)
+                                 gchar       **manufacturer,
+                                 gchar       **model,
+                                 gchar       **copyright)
 {
-  if (name)
+  if (desc)
     {
       GValue *value = g_value_array_get_nth (return_vals, 1);
 
-      *name = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
+      *desc = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
     }
 
-  if (desc)
+  if (manufacturer)
     {
       GValue *value = g_value_array_get_nth (return_vals, 2);
 
-      *desc = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
+      *manufacturer = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
     }
 
-  if (info)
+  if (model)
     {
       GValue *value = g_value_array_get_nth (return_vals, 3);
 
-      *info = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
+      *model = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
+    }
+
+  if (copyright)
+    {
+      GValue *value = g_value_array_get_nth (return_vals, 4);
+
+      *copyright = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
     }
 }
diff --git a/app/plug-in/plug-in-icc-profile.h b/app/plug-in/plug-in-icc-profile.h
index af07067..c20e6c3 100644
--- a/app/plug-in/plug-in-icc-profile.h
+++ b/app/plug-in/plug-in-icc-profile.h
@@ -32,18 +32,20 @@ gboolean  plug_in_icc_profile_apply_rgb (GimpImage     *image,
 gboolean  plug_in_icc_profile_info      (GimpImage     *image,
                                          GimpContext   *context,
                                          GimpProgress  *progress,
-                                         gchar        **name,
-                                         gchar        **desc,
-                                         gchar        **info,
+					 gchar        **desc,
+					 gchar        **manufacturer,
+					 gchar        **model,
+					 gchar        **copyright,
                                          GError       **error);
 
 gboolean  plug_in_icc_profile_file_info (Gimp          *gimp,
                                          GimpContext   *context,
                                          GimpProgress  *progress,
                                          const gchar   *filename,
-                                         gchar        **name,
-                                         gchar        **desc,
-                                         gchar        **info,
+					 gchar        **desc,
+					 gchar        **manufacturer,
+					 gchar        **model,
+					 gchar        **copyright,
                                          GError       **error);
 
 
diff --git a/app/widgets/gimpimageprofileview.c b/app/widgets/gimpimageprofileview.c
index ff0ded8..10cae8b 100644
--- a/app/widgets/gimpimageprofileview.c
+++ b/app/widgets/gimpimageprofileview.c
@@ -138,9 +138,10 @@ static gboolean
 gimp_image_profile_view_query (GimpImageProfileView *view)
 {
   GimpImage   *image;
-  gchar       *name  = NULL;
   gchar       *desc  = NULL;
-  gchar       *info  = NULL;
+  gchar       *manufacturer  = NULL;
+  gchar       *model = NULL;
+  gchar       *copyright  = NULL;
   GError      *error = NULL;
   GtkTextIter  iter;
 
@@ -152,17 +153,14 @@ gimp_image_profile_view_query (GimpImageProfileView *view)
   if (plug_in_icc_profile_info (image,
                                 gimp_get_user_context (image->gimp),
                                 NULL,
-                                &name, &desc, &info,
+                                &desc, &manufacturer, &model, &copyright,
                                 &error))
     {
-      if (desc || name)
+      if (desc)
         {
           const gchar *title;
 
-          if (desc && strlen (desc))
-            title = desc;
-          else
-            title = name;
+	  title = desc;
 
           gtk_text_buffer_insert_with_tags_by_name (view->buffer, &iter,
                                                     title, -1,
@@ -170,8 +168,20 @@ gimp_image_profile_view_query (GimpImageProfileView *view)
           gtk_text_buffer_insert (view->buffer, &iter, "\n", 1);
         }
 
-      if (info)
-        gtk_text_buffer_insert (view->buffer, &iter, info, -1);
+      if (manufacturer) {
+	gchar *text = g_strdup_printf(_("Manufacturer: %s"),manufacturer);
+        gtk_text_buffer_insert (view->buffer, &iter, text, -1);
+	gtk_text_buffer_insert (view->buffer, &iter, "\n", 1);
+	g_free(text);
+      }
+      if (model) {
+	gchar *text = g_strdup_printf(_("Model: %s"),model);
+        gtk_text_buffer_insert (view->buffer, &iter, text, -1);
+	gtk_text_buffer_insert (view->buffer, &iter, "\n", 1);
+	g_free(text);
+      }
+      if (copyright)
+        gtk_text_buffer_insert (view->buffer, &iter, copyright, -1);
     }
   else
     {
@@ -181,9 +191,10 @@ gimp_image_profile_view_query (GimpImageProfileView *view)
       g_error_free (error);
     }
 
-  g_free (name);
   g_free (desc);
-  g_free (info);
+  g_free (manufacturer);
+  g_free (model);
+  g_free (copyright);
 
   return FALSE;
 }
diff --git a/app/widgets/gimpprofilechooserdialog.c b/app/widgets/gimpprofilechooserdialog.c
index cedb7f2..217fb47 100644
--- a/app/widgets/gimpprofilechooserdialog.c
+++ b/app/widgets/gimpprofilechooserdialog.c
@@ -333,48 +333,39 @@ gimp_profile_view_query (GimpProfileChooserDialog *dialog)
 
   if (filename)
     {
-      gchar *name = NULL;
       gchar *desc = NULL;
-      gchar *info = NULL;
+      gchar *manufacturer = NULL;
+      gchar *model = NULL;
+      gchar *copyright = NULL;
 
       if (plug_in_icc_profile_file_info (dialog->gimp,
                                          gimp_get_user_context (dialog->gimp),
                                          NULL,
                                          filename,
-                                         &name, &desc, &info,
+                                         &desc, &manufacturer, &model, &copyright,
                                          NULL))
         {
-          gsize info_len = strlen (info);
-          gsize name_len = strlen (filename);
+          gsize desc_len = strlen (desc);
 
-          /*  lcms tends to adds the filename at the end of the info string.
-           *  Since this is redundant information here, we remove it.
-           */
-          if (info_len > name_len &&
-              strcmp (info + info_len - name_len, filename) == 0)
-            {
-              info_len -= name_len;
-            }
-
-          gtk_text_buffer_set_text (dialog->buffer, info, info_len);
+          gtk_text_buffer_set_text (dialog->buffer, desc, desc_len);
 
           if (desc)
             {
               dialog->desc = desc;
               desc = NULL;
             }
-          else if (name)
+          else if (manufacturer && model)
             {
-              dialog->desc = name;
-              name = NULL;
+              dialog->desc = g_strdup_printf("%s - %s", manufacturer, model);
             }
 
           dialog->filename = filename;
           filename = NULL;
 
-          g_free (name);
           g_free (desc);
-          g_free (info);
+          g_free (manufacturer);
+          g_free (model);
+          g_free (copyright);
         }
 
       g_free (filename);
diff --git a/configure.in b/configure.in
index c567873..4982312 100644
--- a/configure.in
+++ b/configure.in
@@ -62,7 +62,7 @@ m4_define([libcurl_required_version], [7.15.1])
 m4_define([dbus_glib_required_version], [0.70])
 m4_define([libhal_required_version], [0.5.7])
 m4_define([exif_required_version], [0.6.15])
-m4_define([lcms_required_version], [1.16])
+m4_define([lcms_required_version], [2.0])
 
 
 AC_INIT([GIMP], [gimp_version],
@@ -1433,7 +1433,7 @@ AC_ARG_WITH(lcms, [  --without-lcms          build without lcms support])
 have_lcms="no (lcms support disabled)"
 if test "x$with_lcms" != xno; then
   have_lcms=yes
-  PKG_CHECK_MODULES(LCMS, lcms >= lcms_required_version,
+  PKG_CHECK_MODULES(LCMS, lcms2 >= lcms_required_version,
     AC_DEFINE(HAVE_LCMS, 1, [Define to 1 if lcms is available])
     LCMS='lcms$(EXEEXT)',
     have_lcms="no (lcms not found or unusable)")
diff --git a/modules/color-selector-cmyk-lcms.c b/modules/color-selector-cmyk-lcms.c
index f0e3472..9148e47 100644
--- a/modules/color-selector-cmyk-lcms.c
+++ b/modules/color-selector-cmyk-lcms.c
@@ -19,8 +19,9 @@
 #include "config.h"
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
+#include <string.h>
 
-#include <lcms.h>
+#include <lcms2.h>
 
 #include <gtk/gtk.h>
 
@@ -31,7 +32,6 @@
 
 #include "libgimp/libgimp-intl.h"
 
-
 /* definitions and variables */
 
 #define COLORSEL_TYPE_CMYK            (colorsel_cmyk_type)
@@ -94,6 +94,41 @@ static const GimpModuleInfo colorsel_cmyk_info =
 static GType         colorsel_cmyk_type = 0;
 static GObjectClass *parent_class       = NULL;
 
+static gchar *
+lcms_get_profile_info(cmsHPROFILE profile, cmsInfoType info_type)
+{
+  const int MAX_SIZE = 200;
+  wchar_t info[MAX_SIZE];
+  char country_code[2] = cmsNoLanguage;
+  char language_code[2] = cmsNoCountry;
+  char *locale = setlocale(LC_MESSAGES,NULL);
+  if (locale != NULL && strlen(locale)>=2) {
+    strncpy(language_code,locale,2);
+    if (strlen(locale)>=5 && locale[2] == '_')
+      strncpy(country_code,locale+3,2);
+  }
+
+  cmsGetProfileInfo(profile,info_type,language_code,country_code,&info,MAX_SIZE);
+
+  return g_ucs4_to_utf8((gunichar*)&info,-1,NULL,NULL,NULL);
+}
+
+static gchar *
+lcms_icc_profile_get_desc (cmsHPROFILE profile)
+{
+  return lcms_get_profile_info(profile,cmsInfoDescription);
+}
+
+static gchar *
+lcms_icc_profile_get_product (cmsHPROFILE profile)
+{
+  gchar *manufacturer = lcms_get_profile_info(profile,cmsInfoDescription);
+  gchar *model = lcms_get_profile_info(profile,cmsInfoDescription);
+  const int MAX_PRODUCT_LEN = 500;
+  gchar *product = g_new(gchar,MAX_PRODUCT_LEN);
+  g_snprintf (product, MAX_PRODUCT_LEN, "%s - %s", manufacturer, model);
+  return product;
+}
 
 G_MODULE_EXPORT const GimpModuleInfo *
 gimp_module_query (GTypeModule *module)
@@ -153,7 +188,7 @@ colorsel_cmyk_class_init (ColorselCmykClass *klass)
   selector_class->set_color  = colorsel_cmyk_set_color;
   selector_class->set_config = colorsel_cmyk_set_config;
 
-  cmsErrorAction (LCMS_ERROR_IGNORE);
+  //cmsErrorAction (LCMS_ERROR_IGNORE);
 }
 
 static void
@@ -389,7 +424,7 @@ colorsel_cmyk_config_changed (ColorselCmyk *module)
 {
   GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
   GimpColorConfig   *config   = module->config;
-  DWORD              flags    = 0;
+  guint32            flags    = 0;
   cmsHPROFILE        rgb_profile;
   cmsHPROFILE        cmyk_profile;
   const gchar       *name;
@@ -417,13 +452,13 @@ colorsel_cmyk_config_changed (ColorselCmyk *module)
       ! (cmyk_profile = cmsOpenProfileFromFile (config->cmyk_profile, "r")))
     goto out;
 
-  name = cmsTakeProductDesc (cmyk_profile);
+  name = lcms_icc_profile_get_desc (cmyk_profile);
   if (name && ! g_utf8_validate (name, -1, NULL))
     name = _("(invalid UTF-8 string)");
 
   if (! name)
     {
-      name = cmsTakeProductName (cmyk_profile);
+      name = lcms_icc_profile_get_product (cmyk_profile);
       if (name && ! g_utf8_validate (name, -1, NULL))
         name = _("(invalid UTF-8 string)");
     }
diff --git a/modules/display-filter-lcms.c b/modules/display-filter-lcms.c
index 239fa50..ba66b60 100644
--- a/modules/display-filter-lcms.c
+++ b/modules/display-filter-lcms.c
@@ -19,6 +19,7 @@
 #include "config.h"
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
+#include <string.h>
 
 #ifdef G_OS_WIN32
 #define STRICT
@@ -26,7 +27,7 @@
 #define LCMS_WIN_TYPES_ALREADY_DEFINED
 #endif
 
-#include <lcms.h>
+#include <lcms2.h>
 
 #include <gtk/gtk.h>
 
@@ -44,7 +45,6 @@
 
 #include "libgimp/libgimp-intl.h"
 
-
 #define CDISPLAY_TYPE_LCMS            (cdisplay_lcms_get_type ())
 #define CDISPLAY_LCMS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CDISPLAY_TYPE_LCMS, CdisplayLcms))
 #define CDISPLAY_LCMS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CDISPLAY_TYPE_LCMS, CdisplayLcmsClass))
@@ -123,6 +123,13 @@ gimp_module_register (GTypeModule *module)
   return TRUE;
 }
 
+static void cdisplay_lcms_show_error(cmsContext ContextID,
+			    cmsUInt32Number ErrorCode,
+			    const char *Text)
+{
+  g_printerr("lcms error: %s",Text);
+}
+
 static void
 cdisplay_lcms_class_init (CdisplayLcmsClass *klass)
 {
@@ -139,7 +146,7 @@ cdisplay_lcms_class_init (CdisplayLcmsClass *klass)
   display_class->convert     = cdisplay_lcms_convert;
   display_class->changed     = cdisplay_lcms_changed;
 
-  cmsErrorAction (LCMS_ERROR_IGNORE);
+  cmsSetLogErrorHandler(cdisplay_lcms_show_error);
 }
 
 static void
@@ -167,6 +174,46 @@ cdisplay_lcms_finalize (GObject *object)
   G_OBJECT_CLASS (cdisplay_lcms_parent_class)->finalize (object);
 }
 
+// --- Should be in a separate file to be shared by all lcms modules
+
+static gchar *
+lcms_get_profile_info(cmsHPROFILE profile, cmsInfoType info_type)
+{
+  const int MAX_SIZE = 200;
+  wchar_t info[MAX_SIZE];
+  char country_code[2] = cmsNoLanguage;
+  char language_code[2] = cmsNoCountry;
+  char *locale = setlocale(LC_MESSAGES,NULL);
+  if (locale != NULL && strlen(locale)>=2) {
+    strncpy(language_code,locale,2);
+    if (strlen(locale)>=5 && locale[2] == '_')
+      strncpy(country_code,locale+3,2);
+  }
+
+  cmsGetProfileInfo(profile,info_type,language_code,country_code,&info,MAX_SIZE);
+
+  return g_ucs4_to_utf8((gunichar*)&info,-1,NULL,NULL,NULL);
+}
+
+static gchar *
+lcms_icc_profile_get_desc (cmsHPROFILE profile)
+{
+  return lcms_get_profile_info(profile,cmsInfoDescription);
+}
+
+static gchar *
+lcms_icc_profile_get_product (cmsHPROFILE profile)
+{
+  gchar *manufacturer = lcms_get_profile_info(profile,cmsInfoDescription);
+  gchar *model = lcms_get_profile_info(profile,cmsInfoDescription);
+  const int MAX_PRODUCT_LEN = 500;
+  gchar *product = g_new(gchar,MAX_PRODUCT_LEN);
+  g_snprintf (product, MAX_PRODUCT_LEN, "%s - %s", manufacturer, model);
+  return product;
+}
+
+// ----
+
 static void
 cdisplay_lcms_profile_get_info (cmsHPROFILE   profile,
                                 const gchar **name,
@@ -174,17 +221,7 @@ cdisplay_lcms_profile_get_info (cmsHPROFILE   profile,
 {
   if (profile)
     {
-      *name = cmsTakeProductDesc (profile);
-
-      if (! *name)
-        *name = cmsTakeProductName (profile);
-
-      if (*name && ! g_utf8_validate (*name, -1, NULL))
-        *name = _("(invalid UTF-8 string)");
-
-      *info = cmsTakeProductInfo (profile);
-      if (*name && ! g_utf8_validate (*info, -1, NULL))
-        *info = NULL;
+      *name = lcms_icc_profile_get_desc (profile);
     }
   else
     {
@@ -287,7 +324,7 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
   cmsHPROFILE      src_profile   = NULL;
   cmsHPROFILE      dest_profile  = NULL;
   cmsHPROFILE      proof_profile = NULL;
-  DWORD            flags         = 0;
+  gint32            flags         = 0;
 
   if (lcms->transform)
     {
@@ -331,13 +368,17 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
 
       if (config->simulation_gamut_check)
         {
-          guchar r, g, b;
+          cmsUInt16Number alarm_codes[cmsMAXCHANNELS];
+	  guchar r, g, b;
 
           flags |= cmsFLAGS_GAMUTCHECK;
 
           gimp_rgb_get_uchar (&config->out_of_gamut_color, &r, &g, &b);
+	  alarm_codes[0] = r*256;
+	  alarm_codes[1] = g*256;
+	  alarm_codes[2] = b*256;
 
-          cmsSetAlarmCodes (r, g, b);
+          cmsSetAlarmCodes (alarm_codes);
         }
 
       lcms->transform = cmsCreateProofingTransform (src_profile,  TYPE_RGB_8,
@@ -372,7 +413,7 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
 static gboolean
 cdisplay_lcms_profile_is_rgb (cmsHPROFILE profile)
 {
-  return (cmsGetColorSpace (profile) == icSigRgbData);
+  return (cmsGetColorSpace (profile) == cmsSigRgbData);
 }
 
 static cmsHPROFILE
diff --git a/modules/display-filter-proof.c b/modules/display-filter-proof.c
index 79dad9d..e39ff7c 100644
--- a/modules/display-filter-proof.c
+++ b/modules/display-filter-proof.c
@@ -19,8 +19,9 @@
 #include "config.h"
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
+#include <string.h>
 
-#include <lcms.h>
+#include <lcms2.h>
 
 #include <gtk/gtk.h>
 
@@ -90,6 +91,41 @@ static void        cdisplay_proof_convert      (GimpColorDisplay *display,
 static GtkWidget * cdisplay_proof_configure    (GimpColorDisplay *display);
 static void        cdisplay_proof_changed      (GimpColorDisplay *display);
 
+static gchar *
+lcms_get_profile_info(cmsHPROFILE profile, cmsInfoType info_type)
+{
+  const int MAX_SIZE = 200;
+  wchar_t info[MAX_SIZE];
+  char country_code[2] = cmsNoLanguage;
+  char language_code[2] = cmsNoCountry;
+  char *locale = setlocale(LC_MESSAGES,NULL);
+  if (locale != NULL && strlen(locale)>=2) {
+    strncpy(language_code,locale,2);
+    if (strlen(locale)>=5 && locale[2] == '_')
+      strncpy(country_code,locale+3,2);
+  }
+
+  cmsGetProfileInfo(profile,info_type,language_code,country_code,&info,MAX_SIZE);
+
+  return g_ucs4_to_utf8((gunichar*)&info,-1,NULL,NULL,NULL);
+}
+
+static gchar *
+lcms_icc_profile_get_desc (cmsHPROFILE profile)
+{
+  return lcms_get_profile_info(profile,cmsInfoDescription);
+}
+
+static gchar *
+lcms_icc_profile_get_product (cmsHPROFILE profile)
+{
+  gchar *manufacturer = lcms_get_profile_info(profile,cmsInfoDescription);
+  gchar *model = lcms_get_profile_info(profile,cmsInfoDescription);
+  const int MAX_PRODUCT_LEN = 500;
+  gchar *product = g_new(gchar,MAX_PRODUCT_LEN);
+  g_snprintf (product, MAX_PRODUCT_LEN, "%s - %s", manufacturer, model);
+  return product;
+}
 
 static const GimpModuleInfo cdisplay_proof_info =
 {
@@ -150,7 +186,7 @@ cdisplay_proof_class_init (CdisplayProofClass *klass)
   display_class->configure   = cdisplay_proof_configure;
   display_class->changed     = cdisplay_proof_changed;
 
-  cmsErrorAction (LCMS_ERROR_IGNORE);
+  //cmsErrorAction (LCMS_ERROR_IGNORE);
 }
 
 static void
@@ -271,9 +307,9 @@ cdisplay_proof_combo_box_set_active (GimpColorProfileComboBox *combo,
 
   if (profile)
     {
-      label = gimp_any_to_utf8 (cmsTakeProductDesc (profile), -1, NULL);
+      label = lcms_icc_profile_get_desc (profile);
       if (! label)
-        label = gimp_any_to_utf8 (cmsTakeProductName (profile), -1, NULL);
+        label = lcms_icc_profile_get_product (profile);
 
       cmsCloseProfile (profile);
     }
@@ -438,7 +474,7 @@ cdisplay_proof_changed (GimpColorDisplay *display)
 
   if (proofProfile)
     {
-      DWORD flags = cmsFLAGS_SOFTPROOFING;
+      cmsUInt32Number flags = cmsFLAGS_SOFTPROOFING;
 
       if (proof->bpc)
         flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
index 8b679bf..182a46b 100644
--- a/plug-ins/common/lcms.c
+++ b/plug-ins/common/lcms.c
@@ -25,7 +25,7 @@
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
 
-#include <lcms.h>
+#include <lcms2.h>
 
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
@@ -48,9 +48,10 @@
 enum
 {
   STATUS,
-  PROFILE_NAME,
   PROFILE_DESC,
-  PROFILE_INFO,
+  PROFILE_MANUFACTURER,
+  PROFILE_MODEL,
+  PROFILE_COPYRIGHT,
   NUM_RETURN_VALS
 };
 
@@ -85,6 +86,9 @@ static void  run   (const gchar      *name,
                     gint             *nreturn_vals,
                     GimpParam       **return_vals);
 
+static void lcms_show_error(cmsContext ContextID,
+			    cmsUInt32Number ErrorCode,
+			    const char *Text);
 static GimpPDBStatusType  lcms_icc_set       (GimpColorConfig  *config,
                                               gint32            image,
                                               const gchar      *filename);
@@ -97,13 +101,15 @@ static GimpPDBStatusType  lcms_icc_apply     (GimpColorConfig  *config,
                                               gboolean         *dont_ask);
 static GimpPDBStatusType  lcms_icc_info      (GimpColorConfig  *config,
                                               gint32            image,
-                                              gchar           **name,
                                               gchar           **desc,
-                                              gchar           **info);
+                                              gchar           **manufacturer,
+                                              gchar           **model,
+                                              gchar           **copyright);
 static GimpPDBStatusType  lcms_icc_file_info (const gchar      *filename,
-                                              gchar           **name,
                                               gchar           **desc,
-                                              gchar           **info);
+                                              gchar           **manufacturer,
+                                              gchar           **model,
+                                              gchar           **copyright);
 
 static cmsHPROFILE  lcms_image_get_profile       (GimpColorConfig *config,
                                                   gint32           image,
@@ -209,9 +215,10 @@ query (void)
 {
   static const GimpParamDef info_return_vals[] =
   {
-    { GIMP_PDB_STRING, "profile-name", "Name"        },
-    { GIMP_PDB_STRING, "profile-desc", "Description" },
-    { GIMP_PDB_STRING, "profile-info", "Info"        }
+    { GIMP_PDB_STRING, "profile-desc",         "Description"  },
+    { GIMP_PDB_STRING, "profile-manufacturer", "Manufacturer" },
+    { GIMP_PDB_STRING, "profile-model",        "Name"         },
+    { GIMP_PDB_STRING, "profile-copyroght",    "Info"         }
   };
 
   gimp_install_procedure (PLUG_IN_PROC_SET,
@@ -428,7 +435,7 @@ run (const gchar      *name,
         }
     }
 
-  cmsErrorAction (LCMS_ERROR_SHOW);
+  cmsSetLogErrorHandler(lcms_show_error);
 
   switch (proc)
     {
@@ -455,29 +462,33 @@ run (const gchar      *name,
     case PROC_INFO:
     case PROC_FILE_INFO:
       {
-        gchar *name = NULL;
         gchar *desc = NULL;
-        gchar *info = NULL;
+        gchar *manufacturer = NULL;
+        gchar *model = NULL;
+        gchar *copyright = NULL;
 
-        cmsErrorAction (LCMS_ERROR_IGNORE);
+        cmsSetLogErrorHandler (NULL);
 
         if (proc == PROC_INFO)
-          status = lcms_icc_info (config, image, &name, &desc, &info);
+          status = lcms_icc_info (config, image, &desc, &manufacturer, &model, &copyright);
         else
-          status = lcms_icc_file_info (filename, &name, &desc, &info);
+          status = lcms_icc_file_info (filename, &desc, &manufacturer, &model, &copyright);
 
         if (status == GIMP_PDB_SUCCESS)
           {
             *nreturn_vals = NUM_RETURN_VALS;
 
-            values[PROFILE_NAME].type          = GIMP_PDB_STRING;
-            values[PROFILE_NAME].data.d_string = name;
+            values[PROFILE_DESC].type                  = GIMP_PDB_STRING;
+            values[PROFILE_DESC].data.d_string         = desc;
 
-            values[PROFILE_DESC].type          = GIMP_PDB_STRING;
-            values[PROFILE_DESC].data.d_string = desc;
+            values[PROFILE_MANUFACTURER].type          = GIMP_PDB_STRING;
+            values[PROFILE_MANUFACTURER].data.d_string = manufacturer;
 
-            values[PROFILE_INFO].type          = GIMP_PDB_STRING;
-            values[PROFILE_INFO].data.d_string = info;
+            values[PROFILE_MODEL].type                 = GIMP_PDB_STRING;
+            values[PROFILE_MODEL].data.d_string        = model;
+
+            values[PROFILE_COPYRIGHT].type             = GIMP_PDB_STRING;
+            values[PROFILE_COPYRIGHT].data.d_string    = copyright;
           }
       }
       break;
@@ -493,28 +504,44 @@ run (const gchar      *name,
   values[0].data.d_status = status;
 }
 
-static gchar *
-lcms_icc_profile_get_name (cmsHPROFILE profile)
+static void
+lcms_show_error(cmsContext ContextID,
+			    cmsUInt32Number ErrorCode,
+			    const char *Text)
 {
-  return gimp_any_to_utf8 (cmsTakeProductName (profile), -1, NULL);
+  g_printerr("lcms error: %s",Text);
 }
 
+
 static gchar *
-lcms_icc_profile_get_desc (cmsHPROFILE profile)
+lcms_get_profile_info(cmsHPROFILE profile, cmsInfoType info_type)
 {
-  return gimp_any_to_utf8 (cmsTakeProductDesc (profile), -1, NULL);
+  const int MAX_SIZE = 200;
+  wchar_t info[MAX_SIZE];
+  char country_code[2] = cmsNoLanguage;
+  char language_code[2] = cmsNoCountry;
+  char *locale = setlocale(LC_MESSAGES,NULL);
+  if (locale != NULL && strlen(locale)>=2) {
+    strncpy(language_code,locale,2);
+    if (strlen(locale)>=5 && locale[2] == '_')
+      strncpy(country_code,locale+3,2);
+  }
+
+  cmsGetProfileInfo(profile,info_type,language_code,country_code,&info,MAX_SIZE);
+
+  return g_ucs4_to_utf8(&info,-1,NULL,NULL,NULL);
 }
 
 static gchar *
-lcms_icc_profile_get_info (cmsHPROFILE profile)
+lcms_icc_profile_get_desc (cmsHPROFILE profile)
 {
-  return gimp_any_to_utf8 (cmsTakeProductInfo (profile), -1, NULL);
+  return lcms_get_profile_info(profile,cmsInfoDescription);
 }
 
 static gboolean
 lcms_icc_profile_is_rgb (cmsHPROFILE profile)
 {
-  return (cmsGetColorSpace (profile) == icSigRgbData);
+  return (cmsGetColorSpace (profile) == cmsSigRgbData);
 }
 
 static GimpPDBStatusType
@@ -644,9 +671,10 @@ lcms_icc_apply (GimpColorConfig          *config,
 static GimpPDBStatusType
 lcms_icc_info (GimpColorConfig *config,
                gint32           image,
-               gchar          **name,
                gchar          **desc,
-               gchar          **info)
+	       gchar          **manufacturer,
+               gchar          **model,
+	       gchar          **copyright)
 {
   cmsHPROFILE profile;
 
@@ -666,17 +694,19 @@ lcms_icc_info (GimpColorConfig *config,
 
   if (profile)
     {
-      if (name) *name = lcms_icc_profile_get_name (profile);
       if (desc) *desc = lcms_icc_profile_get_desc (profile);
-      if (info) *info = lcms_icc_profile_get_info (profile);
+      if (manufacturer) *manufacturer = lcms_get_profile_info (profile, cmsInfoManufacturer);
+      if (model) *model = lcms_get_profile_info (profile, cmsInfoModel);
+      if (copyright) *copyright = lcms_get_profile_info (profile, cmsInfoCopyright);
 
       cmsCloseProfile (profile);
     }
   else
     {
-      if (name) *name = g_strdup ("sRGB");
-      if (desc) *desc = g_strdup ("sRGB built-in");
-      if (info) *info = g_strdup (_("Default RGB working space"));
+      if (desc) *desc = g_strdup (_("Default RGB working space"));
+      if (manufacturer) *manufacturer = g_strdup ("");
+      if (model) *manufacturer = g_strdup ("");
+      if (copyright) *manufacturer = g_strdup ("");
     }
 
   return GIMP_PDB_SUCCESS;
@@ -684,9 +714,10 @@ lcms_icc_info (GimpColorConfig *config,
 
 static GimpPDBStatusType
 lcms_icc_file_info (const gchar  *filename,
-                    gchar       **name,
                     gchar       **desc,
-                    gchar       **info)
+                    gchar       **manufacturer,
+		    gchar       **model,
+		    gchar       **copyright)
 {
   cmsHPROFILE profile;
 
@@ -698,9 +729,10 @@ lcms_icc_file_info (const gchar  *filename,
   if (! profile)
     return GIMP_PDB_EXECUTION_ERROR;
 
-  *name = lcms_icc_profile_get_name (profile);
-  *desc = lcms_icc_profile_get_desc (profile);
-  *info = lcms_icc_profile_get_info (profile);
+  if (desc) *desc = lcms_icc_profile_get_desc (profile);
+  if (manufacturer) *manufacturer = lcms_get_profile_info (profile, cmsInfoManufacturer);
+  if (model) *model = lcms_get_profile_info (profile, cmsInfoModel);
+  if (copyright) *copyright = lcms_get_profile_info (profile, cmsInfoCopyright);
 
   cmsCloseProfile (profile);
 
@@ -738,8 +770,8 @@ lcms_calculate_checksum (const gchar *data,
       GChecksum *md5 = g_checksum_new (G_CHECKSUM_MD5);
 
       g_checksum_update (md5,
-                         (const guchar *) data + sizeof (icHeader),
-                         len - sizeof (icHeader));
+                         (const guchar *) data + sizeof (cmsICCHeader),
+                         len - sizeof (cmsICCHeader));
 
       len = 16;
       g_checksum_get_digest (md5, digest, &len);
@@ -935,7 +967,7 @@ lcms_image_transform_rgb (gint32                    image,
                           gboolean                  bpc)
 {
   cmsHTRANSFORM  transform   = NULL;
-  DWORD          last_format = 0;
+  gint32          last_format = 0;
   gint          *layers;
   gint           num_layers;
   gint           i;
@@ -945,7 +977,7 @@ lcms_image_transform_rgb (gint32                    image,
   for (i = 0; i < num_layers; i++)
     {
       GimpDrawable *drawable = gimp_drawable_get (layers[i]);
-      DWORD         format;
+      gint32         format;
 
       switch (drawable->bpp)
         {
@@ -1288,8 +1320,6 @@ lcms_icc_combo_box_set_active (GimpColorProfileComboBox *combo,
   if (profile)
     {
       label = lcms_icc_profile_get_desc (profile);
-      if (! label)
-        label = lcms_icc_profile_get_name (profile);
 
       cmsCloseProfile (profile);
     }
@@ -1394,8 +1424,6 @@ lcms_icc_combo_box_new (GimpColorConfig *config,
     profile = cmsCreate_sRGBProfile ();
 
   name = lcms_icc_profile_get_desc (profile);
-  if (! name)
-    name = lcms_icc_profile_get_name (profile);
 
   cmsCloseProfile (profile);
 
@@ -1480,8 +1508,6 @@ lcms_dialog (GimpColorConfig *config,
   gtk_widget_show (frame);
 
   name = lcms_icc_profile_get_desc (src_profile);
-  if (! name)
-    name = lcms_icc_profile_get_name (src_profile);
 
   label = gtk_label_new (name);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
