From owner-freebsd-office@freebsd.org Sun Jan 22 15:35:37 2017 Return-Path: Delivered-To: freebsd-office@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2818CBCF52 for ; Sun, 22 Jan 2017 15:35:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id AB4E3907 for ; Sun, 22 Jan 2017 15:35:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id A7CBACBCF4F; Sun, 22 Jan 2017 15:35:37 +0000 (UTC) Delivered-To: office@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7768CBCF4E for ; Sun, 22 Jan 2017 15:35:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96B68905 for ; Sun, 22 Jan 2017 15:35:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0MFZb4s021117 for ; Sun, 22 Jan 2017 15:35:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: office@FreeBSD.org Subject: [Bug 216372] [patch] devel/icu: turn on same workaround as for Linux to fix incorrect detection UTF-8 locale in some applications Date: Sun, 22 Jan 2017 15:35:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: vvd@unislabs.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: office@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-office@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Office applications on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2017 15:35:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216372 Bug ID: 216372 Summary: [patch] devel/icu: turn on same workaround as for Linux to fix incorrect detection UTF-8 locale in some applications Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: office@FreeBSD.org Reporter: vvd@unislabs.com Flags: maintainer-feedback?(office@FreeBSD.org) Assignee: office@FreeBSD.org Keywords: patch For example net-im/qTox and gwenview5. More information is here: http://bugs.icu-project.org/trac/ticket/12886 https://bugreports.qt.io/browse/QTBUG-57522 https://github.com/qTox/qTox/issues/4012#issuecomment-273962027 This patch was tested for net-im/qTox: --- common/putil.cpp.orig 2016-10-19 17:20:56 UTC +++ common/putil.cpp @@ -1813,6 +1813,31 @@ /* Remap CP949 to a similar codepage to avoid issues with backslash and won symbol. */ name =3D "EUC-KR"; } + if (locale !=3D NULL && uprv_strcmp(name, "euc") =3D=3D 0) { + /* Linux underspecifies the "EUC" name. */ + if (uprv_strcmp(locale, "korean") =3D=3D 0) { + name =3D "EUC-KR"; + } + else if (uprv_strcmp(locale, "japanese") =3D=3D 0) { + /* See comment below about eucJP */ + name =3D "eucjis"; + } + } + else if (uprv_strcmp(name, "eucjp") =3D=3D 0) { + /* + ibm-1350 is the best match, but unavailable. + ibm-954 is mostly a superset of ibm-1350. + ibm-33722 is the default for eucJP (similar to Windows). + */ + name =3D "eucjis"; + } + else if (locale !=3D NULL && uprv_strcmp(locale, "en_US_POSIX") !=3D 0= && + (uprv_strcmp(name, "ANSI_X3.4-1968") =3D=3D 0 || uprv_strcmp(n= ame, "US-ASCII") =3D=3D 0)) { + /* + * For non C/POSIX locale, default the code page to UTF-8 instead = of US-ASCII. + */ + name =3D "UTF-8"; + } #elif U_PLATFORM =3D=3D U_PF_HPUX if (locale !=3D NULL && uprv_strcmp(locale, "zh_HK") =3D=3D 0 && uprv_strcmp(name, "big5") =3D=3D 0) { /* HP decided to extend big5 as hkbig5 even though it's not compat= ible :-( */ @@ -1942,7 +1967,7 @@ nl_langinfo may use the same buffer as setlocale. */ { const char *codeset =3D 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 = =3D=3D U_PF_BSD /* * On Linux and MacOSX, ensure that default codepage for non C/POS= IX locale is UTF-8 * instead of ASCII. --=20 You are receiving this mail because: You are the assignee for the bug.=