FreeBSD Bugzilla – Attachment 179228 Details for
Bug 216372
[patch] devel/icu: turn on same workaround as for Linux to fix incorrect detection UTF-8 locale in some applications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
devel/icu/files/patch-common_putil.cpp
patch-common_putil.cpp (text/x-c++src), 1.79 KB, created by
Vladimir Druzenko
on 2017-01-22 22:21:02 UTC
(
hide
)
Description:
devel/icu/files/patch-common_putil.cpp
Filename:
MIME Type:
Creator:
Vladimir Druzenko
Created:
2017-01-22 22:21:02 UTC
Size:
1.79 KB
patch
obsolete
>--- common/putil.cpp.orig 2016-10-19 20: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 = "EUC-KR"; > } >+ if (locale != NULL && uprv_strcmp(name, "euc") == 0) { >+ /* Linux underspecifies the "EUC" name. */ >+ if (uprv_strcmp(locale, "korean") == 0) { >+ name = "EUC-KR"; >+ } >+ else if (uprv_strcmp(locale, "japanese") == 0) { >+ /* See comment below about eucJP */ >+ name = "eucjis"; >+ } >+ } >+ else if (uprv_strcmp(name, "eucjp") == 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 = "eucjis"; >+ } >+ else if (locale != NULL && uprv_strcmp(locale, "en_US_POSIX") != 0 && >+ (uprv_strcmp(name, "ANSI_X3.4-1968") == 0 || uprv_strcmp(name, "US-ASCII") == 0)) { >+ /* >+ * For non C/POSIX locale, default the code page to UTF-8 instead of US-ASCII. >+ */ >+ name = "UTF-8"; >+ } > #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 +1967,7 @@ > 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.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 216372
:
179228
|
181127