Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-17718

Explicitly set locale in the Dockerfile

    XMLWordPrintableJSON

Details

    Description

      When producing the RC bits for 3.3.1, the releasedocmaker step failed.

      [INFO] --- exec-maven-plugin:1.3.1:exec (releasedocs) @ hadoop-common ---
      Traceback (most recent call last):
        File "/build/source/patchprocess/apache-yetus-0.13.0/bin/../lib/releasedocmaker/releasedocmaker.py", line 25, in <module>
          releasedocmaker.main()
        File "/build/source/patchprocess/apache-yetus-0.13.0/lib/releasedocmaker/releasedocmaker/__init__.py", line 979, in main
          JIRA_BASE_URL)
        File "/build/source/patchprocess/apache-yetus-0.13.0/lib/releasedocmaker/releasedocmaker/utils.py", line 199, in write_list
          self.write_key_raw(jira.get_project(), line)
        File "/build/source/patchprocess/apache-yetus-0.13.0/lib/releasedocmaker/releasedocmaker/utils.py", line 170, in write_key_raw
          self.base.write(input_string)
      UnicodeEncodeError: 'ascii' codec can't encode character '\xdc' in position 71: ordinal not in range(128)
      
      

      It turns out if the script reads jiras containing ascended characters, it can't write the report.

      Inside docker container, the default locale is "ANSI_X3.4-1968". Must set it to utf-8 to support special characters.

      Curious why it wasn't a problem before.

      More details: https://stackoverflow.com/questions/43356982/docker-python-set-utf-8-locale

      Attachments

        Issue Links

          Activity

            People

              weichiu Wei-Chiu Chuang
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m