Commons Lang
  1. Commons Lang
  2. LANG-47

test.lang fails if compiled with non iso-8859-1 locales

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      Linux platform JDK 1.4.1_02

      $ export LANG=C ; ant clean && ant dist && ant test

      test.lang:
      [echo] Running lang package tests ...
      [java] .........................................
      [java] .........................................
      [java] .........................................
      [java] .........................................
      [java] ...........................F.F
      [java] Time: 0.402
      [java] There were 2 failures:
      [java] 1)
      testEscapeHtml(org.apache.commons.lang.StringEscapeUtilsTest)junit.framework.ComparisonFailure:
      languages expected:<...ccedil...> but was:<...#65533...>
      [java] at
      org.apache.commons.lang.StringEscapeUtilsTest.testEscapeHtml(StringEscapeUtilsTest.java:161)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] 2)
      testHtmlunescape(org.apache.commons.lang.StringEscapeUtilsTest)junit.framework.ComparisonFailure:
      languages expected:<...?...> but was:<...ç...>
      [java] at
      org.apache.commons.lang.StringEscapeUtilsTest.testHtmlunescape(StringEscapeUtilsTest.java:168)
      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java] at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [java] at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      [java] FAILURES!!!
      [java] Tests run: 192, Failures: 2, Errors: 0

      $ export LANG=en_US ; ant clean && ant dist && ant test

      [ this one works ]

      $ export LANG=en_US.utf-8 ; ant clean && ant dist && ant test

      [ fails, with a slightly different error #2: ]

      [java] 2)
      testHtmlunescape(org.apache.commons.lang.StringEscapeUtilsTest)junit.framework.ComparisonFailure:
      languages expected:<...�...> but was:<...ç...>

      LANG's setting for "ant test" does not appear to matter. If LANG=C for "ant
      dist", "ant test" will fail even if LANG=en_US.

        Activity

        Sam Varshavchik created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 18836 12340649
        Henri Yandell made changes -
        Component/s Lang [ 12311121 ]
        Key COM-498 LANG-47
        Assignee Henri Yandell [ bayard ]
        Project Commons [ 12310458 ] Commons Lang [ 12310481 ]
        Affects Version/s 2.0 Final [ 12311658 ]
        Fix Version/s 2.0 Final [ 12311658 ]
        Henri Yandell made changes -
        Affects Version/s 2.0 Final [ 12311706 ]
        Henri Yandell made changes -
        Fix Version/s 2.0 Final [ 12311706 ]
        Mark Thomas made changes -
        Workflow jira [ 12369554 ] Default workflow, editable Closed status [ 12602468 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Sam Varshavchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development