Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 2017 22:06:08 +0000 (UTC)
From:      Matthew Rezny <rezny@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r437961 - in head/devel/icu: . files
Message-ID:  <201704072206.v37M68a1083977@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rezny
Date: Fri Apr  7 22:06:07 2017
New Revision: 437961
URL: https://svnweb.freebsd.org/changeset/ports/437961

Log:
  Behave same on BSDs as on Darwin in that UTF-8 shall be used instead of
  ASCII outside the POSIX 'C' locale and UTF-8 is deafult in case anything
  should call ucnv_getDefaultName() prior to calling setlocale(). This change
  fixes problems that occur in multiple Qt5 applications when handling files
  with names containing non-ASCII characters.
  
  PR:		216372
  Reported by:	vvd@unislabs.com
  Approved by:	bapt (office@), swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D10128

Added:
  head/devel/icu/files/patch-common_putil.cpp   (contents, props changed)
Modified:
  head/devel/icu/Makefile

Modified: head/devel/icu/Makefile
==============================================================================
--- head/devel/icu/Makefile	Fri Apr  7 21:50:19 2017	(r437960)
+++ head/devel/icu/Makefile	Fri Apr  7 22:06:07 2017	(r437961)
@@ -3,7 +3,7 @@
 
 PORTNAME=	icu
 DISTVERSION=	58_2
-PORTREVISION?=	0 # keep for icu-lx
+PORTREVISION?=	1 # keep for icu-lx
 PORTEPOCH?=	1
 CATEGORIES?=	devel
 MASTER_SITES=	http://download.icu-project.org/files/icu4c/${PORTVERSION}/

Added: head/devel/icu/files/patch-common_putil.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/icu/files/patch-common_putil.cpp	Fri Apr  7 22:06:07 2017	(r437961)
@@ -0,0 +1,32 @@
+--- common/putil.cpp.orig	2016-10-19 17:20:56 UTC
++++ common/putil.cpp
+@@ -1789,7 +1789,7 @@ remapPlatformDependentCodepage(const cha
+          */
+         name = "ISO-8859-1";
+     }
+-#elif U_PLATFORM_IS_DARWIN_BASED
++#elif U_PLATFORM_IS_DARWIN_BASED || U_PLATFORM == U_PF_BSD
+     if (locale == NULL && *name == 0) {
+         /*
+         No locale was specified, and an empty name was passed in.
+@@ -1808,11 +1808,6 @@ remapPlatformDependentCodepage(const cha
+          */
+         name = "UTF-8";
+     }
+-#elif U_PLATFORM == U_PF_BSD
+-    if (uprv_strcmp(name, "CP949") == 0) {
+-        /* Remap CP949 to a similar codepage to avoid issues with backslash and won symbol. */
+-        name = "EUC-KR";
+-    }
+ #elif U_PLATFORM == U_PF_HPUX
+     if (locale != NULL && uprv_strcmp(locale, "zh_HK") == 0 && uprv_strcmp(name, "big5") == 0) {
+         /* HP decided to extend big5 as hkbig5 even though it's not compatible :-( */
+@@ -1942,7 +1937,7 @@ int_getDefaultCodepage()
+        nl_langinfo may use the same buffer as setlocale. */
+     {
+         const char *codeset = nl_langinfo(U_NL_LANGINFO_CODESET);
+-#if U_PLATFORM_IS_DARWIN_BASED || U_PLATFORM_IS_LINUX_BASED
++#if U_PLATFORM_IS_DARWIN_BASED || U_PLATFORM_IS_LINUX_BASED || U_PLATFORM == U_PF_BSD
+         /*
+          * On Linux and MacOSX, ensure that default codepage for non C/POSIX locale is UTF-8
+          * instead of ASCII.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704072206.v37M68a1083977>