Skip to content

Set LANG=C.UTF-8 in javascript-node and typescript-node images#1926

Merged
abdurriq merged 5 commits into
mainfrom
copilot/fix-unset-lang-variable
Jul 8, 2026
Merged

Set LANG=C.UTF-8 in javascript-node and typescript-node images#1926
abdurriq merged 5 commits into
mainfrom
copilot/fix-unset-lang-variable

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

LANG is unset in the javascript-node (and inherited typescript-node) images, breaking UTF-8 rendering in locale-aware tools — e.g. tmux display-message -p "#{client_utf8}" returns 0 and Unicode characters fail to render.

Changes

  • Dockerfiles: added ENV LANG=C.UTF-8 to both src/javascript-node/.devcontainer/Dockerfile and src/typescript-node/.devcontainer/Dockerfile.

    # Set locale so Unicode characters render correctly in locale-aware tools (e.g. tmux).
    ENV LANG=C.UTF-8
  • Versions (patch bump): javascript-node 4.0.13 → 4.0.14, typescript-node 5.0.1 → 5.0.2, with matching README tag examples.

  • Tests: added a lang-utf8 check to each image's test-project/test.sh asserting $LANG equals C.UTF-8.

Notes

C.UTF-8 is used rather than en_US.UTF-8 because it's always present in the base image without generating a locale, sidestepping the breaking-change concern raised in nodejs/docker-node#1839.

Copilot AI changed the title [WIP] Fix unset LANG variable to enable Unicode rendering Set LANG=C.UTF-8 in javascript-node and typescript-node images Jul 6, 2026
Copilot AI requested a review from Kaniska244 July 6, 2026 09:04
@Kaniska244 Kaniska244 marked this pull request as ready for review July 6, 2026 09:10
@Kaniska244 Kaniska244 requested a review from a team as a code owner July 6, 2026 09:10
Copilot AI review requested due to automatic review settings July 6, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Sets a default UTF-8 locale for the javascript-node image (and the derived typescript-node image) to ensure Unicode renders correctly in locale-aware tooling, and adds smoke tests + version/doc updates to validate and publish the change.

Changes:

  • Add ENV LANG=C.UTF-8 to javascript-node and typescript-node Dockerfiles.
  • Patch-bump image versions in each manifest.json and update README tag examples accordingly.
  • Add a lang-utf8 smoke-test assertion to both images’ test-project/test.sh.
Show a summary per file
File Description
src/javascript-node/.devcontainer/Dockerfile Sets LANG=C.UTF-8 in the base Node image.
src/typescript-node/.devcontainer/Dockerfile Sets LANG=C.UTF-8 in the derived TypeScript image as well.
src/javascript-node/test-project/test.sh Adds a lang-utf8 check asserting LANG defaults to C.UTF-8.
src/typescript-node/test-project/test.sh Adds a lang-utf8 check asserting LANG defaults to C.UTF-8.
src/javascript-node/manifest.json Patch version bump 4.0.13 → 4.0.14.
src/typescript-node/manifest.json Patch version bump 5.0.1 → 5.0.2.
src/javascript-node/README.md Updates README tag examples to 4.0.14-24.
src/typescript-node/README.md Updates README tag examples to 5.0.2-24.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/javascript-node/test-project/test.sh Outdated
Comment thread src/typescript-node/test-project/test.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Kaniska244

Copy link
Copy Markdown
Contributor

@copilot Extend this to base-debian and base-ubuntu images if utf8 charset is not set for them already.

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Extend this to base-debian and base-ubuntu images if utf8 charset is not set for them already.

Done. base-debian and base-ubuntu didn't set a UTF-8 locale, so I added ENV LANG=C.UTF-8 to both Dockerfiles, patch-bumped the manifests (base-debian 2.1.11 → 2.1.12, base-ubuntu 3.0.3 → 3.0.4) with matching README tag examples, and added a lang-utf8 check to each image's test-project/test.sh.

Copilot AI requested a review from Kaniska244 July 6, 2026 09:51
abdurriq
abdurriq previously approved these changes Jul 8, 2026
@abdurriq abdurriq merged commit 40563ff into main Jul 8, 2026
15 checks passed
@abdurriq abdurriq deleted the copilot/fix-unset-lang-variable branch July 8, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unset LANG preventing Unicode chars from displaying

4 participants