{"thread":{"id":"19440","subject":"[PATCH] t8005: use more portable character encoding names","startedAt":"2009-05-22T15:25:04Z","lastAt":"2009-05-28T18:47:58Z","messageCount":15,"participants":["Brandon Casey","Junio C Hamano","Alex Riesen","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"114469","messageId":"WnZxv4G_GKTN4oHhxHO_HuQt0cTqurrqXf2HHDiHLAzdp7wC70aKuqDot7xQ1nG9C8_NASCL1_Q@cipher.nrlssc.navy.mil","threadId":"19440","inReplyTo":null,"subject":"[PATCH] t8005: use more portable character encoding names","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-22T15:25:04Z","receivedAt":"2009-05-22T15:25:04Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some platforms do not have an extensive list of alternate names for\ncharacter encodings.\n\nOn IRIX 6.5 cp1251 is unknown, but WIN1251 (which seems to be a\nnon-standard name) is known.  On Solaris 10, the opposite is true.  Solaris\nalso knows cp1251 as WINDOWS-1251, but this too is not recognized on IRIX.\nI could not find a name that both platforms recognized for this character\nset.\n\nSolaris 7 does not know about shift-jis, but does know SJIS.  It also does\nnot know that utf-8 and UTF-8 refer to the same encoding.\n\nWith the above in mind, and the impression that upper-case code names are\nmore portable than lower-case, the following conversions were performed:\n\n      utf-8 --> UTF-8\n     cp1251 --> CP1251\n  shift-jis --> SJIS\n\nThe UTF-8 and SJIS conversions allow 2 of the 3 elements of test 4 to succeed\non Solaris 7, but alas, my Solaris 7 does not have CP1251.\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n\n\nHere's another patch in an attempt to make the character encoding names\nmore portable.  I hesitate to send it since it does not actually allow any\ntests to pass which were previously failing for me.  At least the utf-8 to\nUTF-8 shouldn't cause any harm.  The shift-jis to SJIS seems to be commonly\nsupported?  at least IRIX 6.5 and Solaris as old as 7 recognize it, but the\nevidence is only empirical.  Modern Solaris, and of course Linux recognize\neither.\n\n-brandon\n\n\n t/t8005-blame-i18n.sh |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh\nindex fcd5c26..9c930a5 100755\n--- a/t/t8005-blame-i18n.sh\n+++ b/t/t8005-blame-i18n.sh\n@@ -15,12 +15,12 @@ test_expect_success 'setup the repository' '\n \n \techo \"CP1251 LINE\" >> file &&\n \tgit add file &&\n-\tgit config i18n.commitencoding cp1251 &&\n+\tgit config i18n.commitencoding CP1251 &&\n \tgit commit --author \"$CP1251_NAME <cp1251@localhost>\" -m \"$CP1251_MSG\" &&\n \n \techo \"SJIS LINE\" >> file &&\n \tgit add file &&\n-\tgit config i18n.commitencoding shift-jis &&\n+\tgit config i18n.commitencoding SJIS &&\n \tgit commit --author \"$SJIS_NAME <sjis@localhost>\" -m \"$SJIS_MSG\"\n '\n \n@@ -51,7 +51,7 @@ EOF\n \n test_expect_success \\\n \t'blame respects i18n.logoutputencoding' '\n-\tgit config i18n.logoutputencoding cp1251 &&\n+\tgit config i18n.logoutputencoding CP1251 &&\n \tgit blame --incremental file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n \ttest_cmp actual expected\n@@ -67,8 +67,8 @@ summary $UTF8_MSG\n EOF\n \n test_expect_success \\\n-\t'blame respects --encoding=utf-8' '\n-\tgit blame --incremental --encoding=utf-8 file | \\\n+\t'blame respects --encoding=UTF-8' '\n+\tgit blame --incremental --encoding=UTF-8 file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n \ttest_cmp actual expected\n '\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114476","messageId":"7vhbzd85ux.fsf@alter.siamese.dyndns.org","threadId":"19440","inReplyTo":"WnZxv4G_GKTN4oHhxHO_HuQt0cTqurrqXf2HHDiHLAzdp7wC70aKuqDot7xQ1nG9C8_NASCL1_Q@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t8005: use more portable character encoding names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-05-22T16:22:46Z","receivedAt":"2009-05-22T16:22:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> writes:\n\n> ...  I hesitate to send it since it does not actually allow any\n> tests to pass which were previously failing for me.  At least the utf-8 to\n> UTF-8 shouldn't cause any harm.  The shift-jis to SJIS seems to be commonly\n> supported?  at least IRIX 6.5 and Solaris as old as 7 recognize it, but the\n> evidence is only empirical.  Modern Solaris, and of course Linux recognize\n> either.\n\nPerhaps the test can be changed from using cp1251 (whatever that is) to\nsomething more common (e.g. 8859-1)?\n\nThere was another more large-ish patch to the tests around this area\nrecently from you.  I liked them but somehow failed to queue any of them\nyet, sorry.\n"},{"id":"114478","messageId":"1vlRZ6iKMvKwtgMEJxvNoDcPRfAVCJ39d4srmMwFYEWx2SenNTUkig@cipher.nrlssc.navy.mil","threadId":"19440","inReplyTo":"7vhbzd85ux.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] t8005: use more portable character encoding names","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-22T16:51:10Z","receivedAt":"2009-05-22T16:51:10Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Junio C Hamano wrote:\n> Brandon Casey <casey@nrlssc.navy.mil> writes:\n> \n>> ...  I hesitate to send it since it does not actually allow any\n>> tests to pass which were previously failing for me.  At least the utf-8 to\n>> UTF-8 shouldn't cause any harm.  The shift-jis to SJIS seems to be commonly\n>> supported?  at least IRIX 6.5 and Solaris as old as 7 recognize it, but the\n>> evidence is only empirical.  Modern Solaris, and of course Linux recognize\n>> either.\n> \n> Perhaps the test can be changed from using cp1251 (whatever that is) to\n> something more common (e.g. 8859-1)?\n\nGood idea.\n\n> There was another more large-ish patch to the tests around this area\n> recently from you.  I liked them but somehow failed to queue any of them\n> yet, sorry.\n\nYou've got them in 'next'.  Did you forget? :) or don't you consider that\nqueued?\n\n-brandon\n"},{"id":"114488","messageId":"81b0412b0905221604h749b4edfo8ea340e85cf1d0ee@mail.gmail.com","threadId":"19440","inReplyTo":"7vhbzd85ux.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] t8005: use more portable character encoding names","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-05-22T23:04:36Z","receivedAt":"2009-05-22T23:04:36Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"2009/5/22 Junio C Hamano <gitster@pobox.com>:\n> Perhaps the test can be changed from using cp1251 (whatever that is) to\n\ncp1251 (win-1251) is Microsoft's Windows Russian\n"},{"id":"114490","messageId":"p2A1PR1KFf_G_uMMwQZtVeaDE_VcBr8lFjs9Jsg_OIkeypNbwPPRHP32EUHJ4leCZsycUOhFjHc@cipher.nrlssc.navy.mil","threadId":"19440","inReplyTo":"7vhbzd85ux.fsf@alter.siamese.dyndns.org","subject":"[PATCH 1/2] t8005: use more portable character encoding names","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-22T23:47:05Z","receivedAt":"2009-05-22T23:47:05Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Some platforms do not have an extensive list of alternate names for\ncharacter encodings.\n\nSolaris 7 does not know about shift-jis, but does know SJIS.  It also does\nnot know that utf-8 and UTF-8 refer to the same encoding.\n\nWith the above in mind, the following conversions were performed:\n\n      utf-8 --> UTF-8\n  shift-jis --> SJIS\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n t/t8005-blame-i18n.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh\nindex fcd5c26..75cbced 100755\n--- a/t/t8005-blame-i18n.sh\n+++ b/t/t8005-blame-i18n.sh\n@@ -20,7 +20,7 @@ test_expect_success 'setup the repository' '\n \n \techo \"SJIS LINE\" >> file &&\n \tgit add file &&\n-\tgit config i18n.commitencoding shift-jis &&\n+\tgit config i18n.commitencoding SJIS &&\n \tgit commit --author \"$SJIS_NAME <sjis@localhost>\" -m \"$SJIS_MSG\"\n '\n \n@@ -67,8 +67,8 @@ summary $UTF8_MSG\n EOF\n \n test_expect_success \\\n-\t'blame respects --encoding=utf-8' '\n-\tgit blame --incremental --encoding=utf-8 file | \\\n+\t'blame respects --encoding=UTF-8' '\n+\tgit blame --incremental --encoding=UTF-8 file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n \ttest_cmp actual expected\n '\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114489","messageId":"p2A1PR1KFf_G_uMMwQZtVXPPBSNcQqEAV1ZnkoQLMJaPzWwJrkH_HCs5Kbt70yQlltZJxs4WxXo@cipher.nrlssc.navy.mil","threadId":"19440","inReplyTo":"p2A1PR1KFf_G_uMMwQZtVeaDE_VcBr8lFjs9Jsg_OIkeypNbwPPRHP32EUHJ4leCZsycUOhFjHc@cipher.nrlssc.navy.mil","subject":"[PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-22T23:47:06Z","receivedAt":"2009-05-22T23:47:06Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"On IRIX 6.5 CP1251 is unknown, but WIN1251 (which seems to be a\nnon-standard name) is known.  On Solaris 10, the opposite is true.  Solaris\nalso knows CP1251 as WINDOWS-1251, but this too is not recognized on IRIX.\nI could not find a name that both platforms recognized for this character\nset.\n\nAn alternative character set which covers the same alphabet seems to be the\nISO8859-5 character set.  Both platforms support this character set, so use\nit instead.\n\nThis allows t8005.4 to pass on Solaris 7, and part of the test to pass on\nIRIX. (My IRIX can't convert SJIS to UTF-8 :(\n\nSigned-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n---\n\n\nThis should still provide the same breadth of testing: a russian code set,\na japanese code set, and unicode.  Wikipedia says that ISO8859-5 is not\nas commonly used as either CP1251 or KOI8-R, but it is available on these\nold platforms.  You'd think that if Solaris 7 has it _and_ IRIX has it,\nthen everything else would too, but still feel free to drop this anyway.\nNeither of those platforms, or Solaris 10 (for me) can convert between\nany of the russian and japanese encodings, so t8005.[23] still fail, and I\ndoubt there is any hope.\n\n-brandon\n\n\n t/t8005-blame-i18n.sh |   26 +++++++++++++-------------\n t/t8005/cp1251.txt    |    2 --\n t/t8005/iso8859-5.txt |    2 ++\n 3 files changed, 15 insertions(+), 15 deletions(-)\n delete mode 100644 t/t8005/cp1251.txt\n create mode 100644 t/t8005/iso8859-5.txt\n\ndiff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh\nindex 75cbced..4460975 100755\n--- a/t/t8005-blame-i18n.sh\n+++ b/t/t8005-blame-i18n.sh\n@@ -4,7 +4,7 @@ test_description='git blame encoding conversion'\n . ./test-lib.sh\n \n . \"$TEST_DIRECTORY\"/t8005/utf8.txt\n-. \"$TEST_DIRECTORY\"/t8005/cp1251.txt\n+. \"$TEST_DIRECTORY\"/t8005/iso8859-5.txt\n . \"$TEST_DIRECTORY\"/t8005/sjis.txt\n \n test_expect_success 'setup the repository' '\n@@ -13,10 +13,10 @@ test_expect_success 'setup the repository' '\n \tgit add file &&\n \tgit commit --author \"$UTF8_NAME <utf8@localhost>\" -m \"$UTF8_MSG\" &&\n \n-\techo \"CP1251 LINE\" >> file &&\n+\techo \"KOI8-R LINE\" >> file &&\n \tgit add file &&\n-\tgit config i18n.commitencoding cp1251 &&\n-\tgit commit --author \"$CP1251_NAME <cp1251@localhost>\" -m \"$CP1251_MSG\" &&\n+\tgit config i18n.commitencoding ISO8859-5 &&\n+\tgit commit --author \"$ISO8859_5_NAME <iso8859-5@localhost>\" -m \"$ISO8859_5_MSG\" &&\n \n \techo \"SJIS LINE\" >> file &&\n \tgit add file &&\n@@ -41,17 +41,17 @@ test_expect_success \\\n '\n \n cat >expected <<EOF\n-author $CP1251_NAME\n-summary $CP1251_MSG\n-author $CP1251_NAME\n-summary $CP1251_MSG\n-author $CP1251_NAME\n-summary $CP1251_MSG\n+author $ISO8859_5_NAME\n+summary $ISO8859_5_MSG\n+author $ISO8859_5_NAME\n+summary $ISO8859_5_MSG\n+author $ISO8859_5_NAME\n+summary $ISO8859_5_MSG\n EOF\n \n test_expect_success \\\n \t'blame respects i18n.logoutputencoding' '\n-\tgit config i18n.logoutputencoding cp1251 &&\n+\tgit config i18n.logoutputencoding ISO8859-5 &&\n \tgit blame --incremental file | \\\n \t\tegrep \"^(author|summary) \" > actual &&\n \ttest_cmp actual expected\n@@ -76,8 +76,8 @@ test_expect_success \\\n cat >expected <<EOF\n author $SJIS_NAME\n summary $SJIS_MSG\n-author $CP1251_NAME\n-summary $CP1251_MSG\n+author $ISO8859_5_NAME\n+summary $ISO8859_5_MSG\n author $UTF8_NAME\n summary $UTF8_MSG\n EOF\ndiff --git a/t/t8005/cp1251.txt b/t/t8005/cp1251.txt\ndeleted file mode 100644\nindex ce41e98..0000000\n--- a/t/t8005/cp1251.txt\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-CP1251_NAME=\"Èâàí Ïåòðîâè÷ Ñèäîðîâ\"\n-CP1251_MSG=\"Òåñòîâîå ñîîáùåíèå\"\ndiff --git a/t/t8005/iso8859-5.txt b/t/t8005/iso8859-5.txt\nnew file mode 100644\nindex 0000000..2e4b80c\n--- /dev/null\n+++ b/t/t8005/iso8859-5.txt\n@@ -0,0 +1,2 @@\n+ISO8859_5_NAME=\"¸ÒÐÝ ¿ÕâàÞÒØç ÁØÔÞàÞÒ\"\n+ISO8859_5_MSG=\"ÂÕáâÞÒÞÕ áÞÞÑéÕÝØÕ\"\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114491","messageId":"7vskiw4ooe.fsf@alter.siamese.dyndns.org","threadId":"19440","inReplyTo":"p2A1PR1KFf_G_uMMwQZtVXPPBSNcQqEAV1ZnkoQLMJaPzWwJrkH_HCs5Kbt70yQlltZJxs4WxXo@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-05-23T01:02:09Z","receivedAt":"2009-05-23T01:02:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brandon Casey <casey@nrlssc.navy.mil> writes:\n\n> This should still provide the same breadth of testing: a russian code set,\n> a japanese code set, and unicode.  Wikipedia says that ISO8859-5 is not\n> as commonly used as either CP1251 or KOI8-R, but it is available on these\n> old platforms.  You'd think that if Solaris 7 has it _and_ IRIX has it,\n> then everything else would too, but still feel free to drop this anyway.\n> Neither of those platforms, or Solaris 10 (for me) can convert between\n> any of the russian and japanese encodings, so t8005.[23] still fail, and I\n> doubt there is any hope.\n\nThanks.\n\nMy earlier experience with Sun is that their iconv cannot convert between\ndifferent encodings of Japanese but can use UTF-8 as a pivot to convert,\ne.g. SJIS -> UTF-8 -> ISO-2022.  Perhaps there is an workaround, but I\ndunno.\n"},{"id":"114492","messageId":"7vhbzc4oht.fsf@alter.siamese.dyndns.org","threadId":"19440","inReplyTo":"7vskiw4ooe.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-05-23T01:06:06Z","receivedAt":"2009-05-23T01:06:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"By the way, with the attached patch, I seem to be able to compile\neverything more or less cleanly on OpenSolaris (200811).\n\nIn git-compat-util.h, we do\n\n    #define _XOPEN_SOURCE 600\n    #define _XOPEN_SOURCE_EXTENDED 1\n\nand their /usr/include/sys/feature_tests.h has this nice table:\n\n    Feature Test Macro\t\t\t\t     Specification\n    ------------------------------------------------  -------------\n    _XOPEN_SOURCE                                         XPG3\n    _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4\n    _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2\n    _XOPEN_SOURCE = 500                                   XPG5\n    _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6\n\nLater in the same header, compilation with -c99 is made to fail if _XPG6 is\nnot set, like this:\n\n    #if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))\n    #error \"Compiler or options invalid for pre-UNIX 03 X/Open applications \\\n            and pre-2001 POSIX applications\"\n    #elif ...\n\nThe problem is that they check things in an order that is inconvenient for\nus.  When they see _XOPEN_SOURCE_EXTENDED, they declare that we are XPG4v2\nregardless of the value of _XOPEN_SOURCE.\n\nIt also appears that we do not need OLD_ICONV anymore, as our Makefile\nsuggests for older releases.\n\nIt would be nice if people with older Solaris can check if I am not\nbreaking things for them...\n\n Makefile          |    4 +++-\n git-compat-util.h |    2 ++\n 2 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex fdb39fa..e7fc399 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -701,7 +701,9 @@ ifeq ($(uname_S),SunOS)\n \tNO_MEMMEM = YesPlease\n \tNO_HSTRERROR = YesPlease\n \tNO_MKDTEMP = YesPlease\n-\tOLD_ICONV = UnfortunatelyYes\n+\tifneq ($(uname_R),5.11)\n+\t\tOLD_ICONV = UnfortunatelyYes\n+\tendif\n \tifeq ($(uname_R),5.8)\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex c7cf2d5..4236647 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -41,8 +41,10 @@\n \n #if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)\n #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */\n+#ifndef __sun__\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n+#endif\n #define _ALL_SOURCE 1\n #define _GNU_SOURCE 1\n #define _BSD_SOURCE 1\n"},{"id":"114641","messageId":"20090525092027.GA22382@coredump.intra.peff.net","threadId":"19440","inReplyTo":"7vhbzc4oht.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-25T09:20:27Z","receivedAt":"2009-05-25T09:20:27Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, May 22, 2009 at 06:06:06PM -0700, Junio C Hamano wrote:\n\n> It also appears that we do not need OLD_ICONV anymore, as our Makefile\n> suggests for older releases.\n> \n> It would be nice if people with older Solaris can check if I am not\n> breaking things for them...\n\nGit builds fine on my Solaris 8 test box with this patch. It also builds\nfine if I drop OLD_ICONV, so it may be that we can unconditionally do\nso (but I don't have any older boxen to test with).\n\nWith current 'next' and NO_PERL set, I can pass every test except:\n\n  t3900 - still problems in the eucJP test. I haven't looked closely,\n          but my understanding is that this might need extra language\n          packs installed (I know virtually nothing about Solaris\n          administration and the box is not mine).\n\n  t8005 - git produces incorrect (or at least not expected) results for\n          the iso8859-5 to sjis conversion. It all looks like control\n          characters to me, so I'm not sure how to diagnose (and it may\n          just be an installation issue again).\n\n  t4116,t5000,t5001 - Solaris tar doesn't like pax headers that\n                      git-archive generates\n\n  t7700 - seems to be some problem invoking touch. This might be easily\n          fixable, so I'll look into it.\n\n-Peff\n"},{"id":"114642","messageId":"20090525092643.GB22382@coredump.intra.peff.net","threadId":"19440","inReplyTo":"20090525092027.GA22382@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-25T09:26:43Z","receivedAt":"2009-05-25T09:26:43Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 25, 2009 at 05:20:27AM -0400, Jeff King wrote:\n\n> With current 'next' and NO_PERL set, I can pass every test except:\n> [...]\n>   t7700 - seems to be some problem invoking touch. This might be easily\n>           fixable, so I'll look into it.\n\nNever mind about this one. It is broken with /usr/ucb/touch (because it\nuses \"-r\"), but I usually do my auto-builds with /usr/bin/touch (I just\nnoticed it because I was testing by hand).\n\n-Peff\n"},{"id":"114740","messageId":"zik8bR55cIiktB2euEByCZIZJ1jtx64yA5n1Ki8IMrW1wLBzuBR8Yw@cipher.nrlssc.navy.mil","threadId":"19440","inReplyTo":"20090525092027.GA22382@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-26T14:56:26Z","receivedAt":"2009-05-26T14:56:26Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Fri, May 22, 2009 at 06:06:06PM -0700, Junio C Hamano wrote:\n> \n>> It also appears that we do not need OLD_ICONV anymore, as our Makefile\n>> suggests for older releases.\n>>\n>> It would be nice if people with older Solaris can check if I am not\n>> breaking things for them...\n\nI will.\n\n> Git builds fine on my Solaris 8 test box with this patch. It also builds\n> fine if I drop OLD_ICONV, so it may be that we can unconditionally do\n> so (but I don't have any older boxen to test with).\n\nIt also appears from looking at /usr/include/iconv.h that Solaris 10 does\nnot need it as long as _XPG6 is defined since that file has:\n\n  #ifdef _XPG6\n  extern size_t   iconv(iconv_t, char **_RESTRICT_KYWD,\n                  size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD,\n                  size_t *_RESTRICT_KYWD);\n  #else\n  extern size_t   iconv(iconv_t, const char **_RESTRICT_KYWD,\n                  size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD,\n                  size_t *_RESTRICT_KYWD);\n  #endif\n\nI haven't tested, but I will.  I think Solaris 7 needs it though.\n\n> With current 'next' and NO_PERL set, I can pass every test except:\n> \n>   t3900 - still problems in the eucJP test. I haven't looked closely,\n>           but my understanding is that this might need extra language\n>           packs installed (I know virtually nothing about Solaris\n>           administration and the box is not mine).\n\nt3900.2[23] ?\n\nYes, Solaris 7 and 10 fail for me on those tests.  Neither can convert\nbetween eucJP and ISO-2022-JP.  The other tests pass because it can\nconvert from either of those to UTF-8 and vice versa.\n\nThe iconv libraries seem to be named according to the conversions that\nthey can perform.  So in /usr/lib/iconv/ you'll see:\n\n   UTF-8%eucJP.so\n   eucJP%UTF-8.so\n   ISO-2022-JP%UTF-8.so\n   UTF-8%ISO-2022-JP.so\n   etc.\n\nbut you won't see (at least I don't)\n\n   eucJP%ISO-2022-JP.so\n   ISO-2022-JP.so%eucJP\n\n>   t8005 - git produces incorrect (or at least not expected) results for\n>           the iso8859-5 to sjis conversion. It all looks like control\n>           characters to me, so I'm not sure how to diagnose (and it may\n>           just be an installation issue again).\n\nt8005.[23]\n\nSame reason as above, no conversion between ISO8859-5 and SJIS.  t8005.4\npasses since conversion for both of those to UTF-8 is installed.\n\n>   t4116,t5000,t5001 - Solaris tar doesn't like pax headers that\n>                       git-archive generates\n\nSame here.\n\n\nOn Solaris 7, I additionally must skip:\n\n   t5100.[56] t5100.1[026-9] t5100.2[0-6]\n\nThis is because iconv on Solaris 7 doesn't understand charset 'us-ascii'.\nIf I change 'charset=us-ascii' to 'charset=646' everywhere in t5100/sample.mbox\nand t5100/rfc2047-samples.mbox, then all of t5100 passes.  It seems '646' is\nthe only name by which Solaris 7 recognizes ISO 646 aka ascii.  Other platforms\ndo not recognize '646'.\n\n\nAlso, if you want to test with the Korn shell (you'll need a couple minor\ntweaks to the test lib), t6030.1[23] must be skipped.  It seems even Solaris\n10 has what I consider a bug in ksh which affects how traps are handled.  A\ntrap set in one function, will not be called in the second sub-function.\n\ni.e.\n\n   f1()\n     sets a trap on EXIT\n     calls f2()\n       calls f3()\n         calls exit\n\n   The trap set in f1() will _not_ be executed.\n\nI have only observed this behavior on Solaris.  git-bisect sets such a trap,\nbut I think it is being rewritten in c, so hopefully this issue will go away\nsoon.\n\n-brandon\n"},{"id":"114739","messageId":"xZbeuW5cnER48WqsONW1BxZmepHjuwJtRUnpLAV0nv4mheMkGHT26g@cipher.nrlssc.navy.mil","threadId":"19440","inReplyTo":"20090525092027.GA22382@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-26T14:57:41Z","receivedAt":"2009-05-26T14:57:41Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Fri, May 22, 2009 at 06:06:06PM -0700, Junio C Hamano wrote:\n> \n>> It also appears that we do not need OLD_ICONV anymore, as our Makefile\n>> suggests for older releases.\n>>\n>> It would be nice if people with older Solaris can check if I am not\n>> breaking things for them...\n> \n> Git builds fine on my Solaris 8 test box with this patch. It also builds\n> fine if I drop OLD_ICONV, so it may be that we can unconditionally do\n> so (but I don't have any older boxen to test with).\n> \n> With current 'next' and NO_PERL set, I can pass every test except:\n\nOh, and have the recent changes that are now in next _allowed_ any new tests to\npass that were previously failing?\n\n-brandon\n"},{"id":"114751","messageId":"7v3aaro4m0.fsf@alter.siamese.dyndns.org","threadId":"19440","inReplyTo":"20090525092027.GA22382@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-05-26T22:56:39Z","receivedAt":"2009-05-26T22:56:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>   t3900 - still problems in the eucJP test. I haven't looked closely,\n>           but my understanding is that this might need extra language\n>           packs installed (I know virtually nothing about Solaris\n>           administration and the box is not mine).\n\nI think I know about this one.\n\n    From:\tJunio C Hamano <gitster@pobox.com>\n    Subject: [PATCH] t3900: ISO-2022-JP has more than one popular variants\n    Date:\tTue, 12 May 2009 02:29:10 -0700\n    Message-ID: <7vljp28yah.fsf@alter.siamese.dyndns.org>\n\n   I had to \"pkg install lang-support-japanese\" to pass this test.\n\n>   t8005 - git produces incorrect (or at least not expected) results for\n>           the iso8859-5 to sjis conversion. It all looks like control\n>           characters to me, so I'm not sure how to diagnose (and it may\n>           just be an installation issue again).\n\nI haven't looked at this myself, but I've seen this consistently fail.\n\n>   t4116,t5000,t5001 - Solaris tar doesn't like pax headers that\n>                       git-archive generates\n\nI think I force it to use gtar.\n"},{"id":"114940","messageId":"20090528184334.GB13499@coredump.intra.peff.net","threadId":"19440","inReplyTo":"zik8bR55cIiktB2euEByCZIZJ1jtx64yA5n1Ki8IMrW1wLBzuBR8Yw@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-28T18:43:34Z","receivedAt":"2009-05-28T18:43:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, May 26, 2009 at 09:56:26AM -0500, Brandon Casey wrote:\n\n> It also appears from looking at /usr/include/iconv.h that Solaris 10 does\n> not need it as long as _XPG6 is defined since that file has:\n> \n>   #ifdef _XPG6\n>   extern size_t   iconv(iconv_t, char **_RESTRICT_KYWD,\n>                   size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD,\n>                   size_t *_RESTRICT_KYWD);\n>   #else\n>   extern size_t   iconv(iconv_t, const char **_RESTRICT_KYWD,\n>                   size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD,\n>                   size_t *_RESTRICT_KYWD);\n>   #endif\n> \n> I haven't tested, but I will.  I think Solaris 7 needs it though.\n\nHmph. On Solaris 8, there is no such conditional; iconv is defined\nsimilar to the second version you quoted above:\n\n  extern size_t iconv(iconv_t, const char **, size_t *, char **, size_t *);\n\nSo it would seem we do need OLD_ICONV there. But it compiles just fine\nwithout any warnings.\n\n> >   t3900 - still problems in the eucJP test. I haven't looked closely,\n> >           but my understanding is that this might need extra language\n> >           packs installed (I know virtually nothing about Solaris\n> >           administration and the box is not mine).\n> \n> t3900.2[23] ?\n\nYes.\n\n> The iconv libraries seem to be named according to the conversions that\n> they can perform.  So in /usr/lib/iconv/ you'll see:\n> \n>    UTF-8%eucJP.so\n>    eucJP%UTF-8.so\n>    ISO-2022-JP%UTF-8.so\n>    UTF-8%ISO-2022-JP.so\n>    etc.\n> \n> but you won't see (at least I don't)\n> \n>    eucJP%ISO-2022-JP.so\n>    ISO-2022-JP.so%eucJP\n\nAh, I didn't know about that. Thanks. I also have the ones for UTF-8\nconversion, but not for direct eucJP to ISO-2022-JP conversion.\n\n> >   t8005 - git produces incorrect (or at least not expected) results for\n> >           the iso8859-5 to sjis conversion. It all looks like control\n> >           characters to me, so I'm not sure how to diagnose (and it may\n> >           just be an installation issue again).\n> \n> t8005.[23]\n> \n> Same reason as above, no conversion between ISO8859-5 and SJIS.  t8005.4\n> passes since conversion for both of those to UTF-8 is installed.\n\nOK, makes sense.\n\n> On Solaris 7, I additionally must skip:\n> \n>    t5100.[56] t5100.1[026-9] t5100.2[0-6]\n\nThose work just fine for me on Solaris 8.\n\n> Also, if you want to test with the Korn shell (you'll need a couple minor\n> tweaks to the test lib), t6030.1[23] must be skipped.  It seems even Solaris\n\nI do all of my testing with bash, having given up on Solaris /bin/sh. In\nfact, I have found that bash 2.05 works, but bash 2.03 does _not_ (it\ndoesn't like sourcing the files with non-ascii characters in t8005.\n\n-Peff\n"},{"id":"114941","messageId":"20090528184758.GC13499@coredump.intra.peff.net","threadId":"19440","inReplyTo":"xZbeuW5cnER48WqsONW1BxZmepHjuwJtRUnpLAV0nv4mheMkGHT26g@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 2/2] t8005: convert CP1251 character set to ISO8859-5","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-28T18:47:58Z","receivedAt":"2009-05-28T18:47:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, May 26, 2009 at 09:57:41AM -0500, Brandon Casey wrote:\n\n> > With current 'next' and NO_PERL set, I can pass every test except:\n> \n> Oh, and have the recent changes that are now in next _allowed_ any new\n> tests to pass that were previously failing?\n\nJust one. It had been a while since I re-checked the skipped tests, so\nmost of what I found I could now pass was unrelated. But I believe your\nrecent patches fixed t3901 for me. On current 'next', it passes, but on\ncurrent 'maint', it says something like \"cannot convert UTF-8 to utf-8\".\n\n-Peff\n"}]}