Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-13085

Change Pipelines default image locale to C.UTF-8

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      To be able to handle unicode characters, I want the default build environment to use a better locale. Right now it uses POSIX, and using en_US.UTF-8 would help.

      #!bash
      
      pipelines:
        branches:
          master:
            - step:
                script:
                  - locale
      
      

      gives

      #!bash
      
      
      
      + locale
      LANG=
      LANGUAGE=
      LC_CTYPE="POSIX"
      LC_NUMERIC="POSIX"
      LC_TIME="POSIX"
      LC_COLLATE="POSIX"
      LC_MONETARY="POSIX"
      LC_MESSAGES="POSIX"
      LC_PAPER="POSIX"
      LC_NAME="POSIX"
      LC_ADDRESS="POSIX"
      LC_TELEPHONE="POSIX"
      LC_MEASUREMENT="POSIX"
      LC_IDENTIFICATION="POSIX"
      LC_ALL=
      
      

      Workarounds

      One workaround is to create your own docker image like this
      https://answers.atlassian.com/questions/39140980/how-do-i-create-a-docker-image-for-bitbucket-pipelines

      Using a Docker image that can looks something like this:

      #!bash
      
      FROM gcc #Some smart base image
       
      # Whatever you need more than what is on the base image required by your project
       
      # Set the locale
      RUN locale-gen en_US.UTF-8  
      ENV LANG en_US.UTF-8  
      ENV LANGUAGE en_US:en  
      ENV LC_ALL en_US.UTF-8     
      

      Another even easier workaround is to set these environment variables in your build script or Pipelines settings.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sbirgisson Sigurdur Birgisson (Inactive)
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: