diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
new file mode 100644
index beb177d..e4fec34
*** a/contrib/pg_upgrade/check.c
--- b/contrib/pg_upgrade/check.c
*************** static void
*** 406,421 ****
  check_locale_and_encoding(ControlData *oldctrl,
  						  ControlData *newctrl)
  {
! 	/* These are often defined with inconsistent case, so use pg_strcasecmp(). */
  	if (pg_strcasecmp(oldctrl->lc_collate, newctrl->lc_collate) != 0)
  		pg_log(PG_FATAL,
! 			   "old and new cluster lc_collate values do not match\n");
  	if (pg_strcasecmp(oldctrl->lc_ctype, newctrl->lc_ctype) != 0)
  		pg_log(PG_FATAL,
! 			   "old and new cluster lc_ctype values do not match\n");
  	if (pg_strcasecmp(oldctrl->encoding, newctrl->encoding) != 0)
  		pg_log(PG_FATAL,
! 			   "old and new cluster encoding values do not match\n");
  }
  
  
--- 406,428 ----
  check_locale_and_encoding(ControlData *oldctrl,
  						  ControlData *newctrl)
  {
! 	/*
! 	 *	These are often defined with inconsistent case, so use pg_strcasecmp().
! 	 *	They also often use inconsistent hyphenation, which we cannot fix, e.g.
! 	 *	UTF-8 vs. UTF8, so at least we display the mismatching values.
! 	 */
  	if (pg_strcasecmp(oldctrl->lc_collate, newctrl->lc_collate) != 0)
  		pg_log(PG_FATAL,
! 			   "lc_collate cluster values do not match:  old \"%s\", new \"%s\"\n",
! 			   oldctrl->lc_collate, newctrl->lc_collate);
  	if (pg_strcasecmp(oldctrl->lc_ctype, newctrl->lc_ctype) != 0)
  		pg_log(PG_FATAL,
! 			   "lc_ctype cluster values do not match:  old \"%s\", new \"%s\"\n",
! 			   oldctrl->lc_ctype, newctrl->lc_ctype);
  	if (pg_strcasecmp(oldctrl->encoding, newctrl->encoding) != 0)
  		pg_log(PG_FATAL,
! 			   "encoding cluster values do not match:  old \"%s\", new \"%s\"\n",
! 			   oldctrl->encoding, newctrl->encoding);
  }
  
  
