[GH-ISSUE #1308] Consider passing LANG=C.UTF-8 #709

Closed
opened 2026-03-01 21:45:43 +03:00 by kerem · 6 comments
Owner

Originally created by @bric3 on GitHub (Aug 18, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1308

Bug report info

act version:            0.2.30
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:           
        /Users/brice.dutheil/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.18.4
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.30
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               amd64
                GOOS:                 darwin
                GOAMD64:              v1
Docker Engine:
        Engine version:        20.10.17
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:            
        OS arch:               x86_64
        OS kernel:             5.10.104-linuxkit
        OS CPU:                6
        OS memory:             3933 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act release --reuse --secret GITHUB_TOKEN

Describe issue

When using the command above my gradle build fails due to encoding problems. While the title is using the word consider I believe this is a bug as the goal of this tool is to somewhat mimic Github Action, and this behavior is hard to troubleshoot if you didn't encounter it before.

error: unmappable character (0xA6) for encoding US-ASCII

On Github Action this doesn't fail. Since it appears a locale / lang problem I ran a GA job with a step simply printing the environment - run: env, and indeed it appears LANG is set to C.UTF-8 in GA, but it's missing when running act.

Indeed, passing this to the act command fixes the issue:

act release --reuse --env LANG=C.UTF-8 --secret GITHUB_TOKEN

https://github.com/bric3/fireplace

Workflow content

name: CI-release

on:
  # Release event https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release
  release:
    types: [ prereleased, released ]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.release.tag_name }}
          fetch-depth: 50
      - name: Set up JDK 11
        uses: actions/setup-java@v3
        with:
          java-version: '11'
          distribution: 'zulu'
      - name: Publish to Central
        uses: gradle/gradle-build-action@v2
        if: success()
        env:
          ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
          ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
          ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
          ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
        with:
          arguments: publish -Ppublish.central=false

Relevant log output

[CI-release/publish]   💾  ::save-state name=CACHE_LISTENER::{"cacheEntries":[],"cacheReadOnly":false,"cacheWriteOnly":false,"cacheDisabled":true}
| [command]/Users/brice.dutheil/opensource/fireplace/gradlew publish -Ppublish.central=false
| Type-safe project accessors is an incubating feature.
| > Task :publish UP-TO-DATE
| 
| > Task :fireplace-swing:compileJava
| /Users/brice.dutheil/opensource/fireplace/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FrameRenderer.java:211: error: unmappable character (0xE2) for encoding US-ASCII
|             // don't draw text, if too long or too short (like "r???")

Additional information

No response

Originally created by @bric3 on GitHub (Aug 18, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1308 ### Bug report info ```plain text act version: 0.2.30 GOOS: darwin GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /Users/brice.dutheil/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.18.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.30 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.10.104-linuxkit OS CPU: 6 OS memory: 3933 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act release --reuse --secret GITHUB_TOKEN ``` ### Describe issue When using the command above my gradle build fails due to encoding problems. While the title is using the word _consider_ I believe this is a bug as the goal of this tool is to somewhat mimic Github Action, and this behavior is hard to troubleshoot if you didn't encounter it before. ``` error: unmappable character (0xA6) for encoding US-ASCII ``` On Github Action this doesn't fail. Since it appears a locale / lang problem I ran a GA job with a step simply printing the environment `- run: env`, and indeed it appears `LANG` is set to `C.UTF-8` in GA, but it's missing when running `act`. Indeed, passing this to the `act` command fixes the issue: ``` act release --reuse --env LANG=C.UTF-8 --secret GITHUB_TOKEN ``` ### Link to GitHub repository https://github.com/bric3/fireplace ### Workflow content ```yml name: CI-release on: # Release event https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release release: types: [ prereleased, released ] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: ref: ${{ github.event.release.tag_name }} fetch-depth: 50 - name: Set up JDK 11 uses: actions/setup-java@v3 with: java-version: '11' distribution: 'zulu' - name: Publish to Central uses: gradle/gradle-build-action@v2 if: success() env: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }} ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }} with: arguments: publish -Ppublish.central=false ``` ### Relevant log output ```sh [CI-release/publish] 💾 ::save-state name=CACHE_LISTENER::{"cacheEntries":[],"cacheReadOnly":false,"cacheWriteOnly":false,"cacheDisabled":true} | [command]/Users/brice.dutheil/opensource/fireplace/gradlew publish -Ppublish.central=false | Type-safe project accessors is an incubating feature. | > Task :publish UP-TO-DATE | | > Task :fireplace-swing:compileJava | /Users/brice.dutheil/opensource/fireplace/fireplace-swing/src/main/java/io/github/bric3/fireplace/flamegraph/FrameRenderer.java:211: error: unmappable character (0xE2) for encoding US-ASCII | // don't draw text, if too long or too short (like "r???") ``` ### Additional information _No response_
kerem 2026-03-01 21:45:43 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Sep 18, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1250159972 --> @github-actions[bot] commented on GitHub (Sep 18, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@bric3 commented on GitHub (Sep 18, 2022):

still interested

<!-- gh-comment-id:1250362058 --> @bric3 commented on GitHub (Sep 18, 2022): still interested
Author
Owner

@github-actions[bot] commented on GitHub (Oct 19, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1283166894 --> @github-actions[bot] commented on GitHub (Oct 19, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@bric3 commented on GitHub (Oct 19, 2022):

Not stale.
I don't know how to contribute this fix though.

<!-- gh-comment-id:1283464215 --> @bric3 commented on GitHub (Oct 19, 2022): Not stale. I don't know how to contribute this fix though.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 20, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1320997408 --> @github-actions[bot] commented on GitHub (Nov 20, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@bric3 commented on GitHub (Nov 21, 2022):

not stale

<!-- gh-comment-id:1321853794 --> @bric3 commented on GitHub (Nov 21, 2022): not stale
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#709
No description provided.