Set LANG=C.UTF-8 in javascript-node and typescript-node images#1926
Conversation
There was a problem hiding this comment.
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-8tojavascript-nodeandtypescript-nodeDockerfiles. - Patch-bump image versions in each
manifest.jsonand update README tag examples accordingly. - Add a
lang-utf8smoke-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
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot Extend this to base-debian and base-ubuntu images if utf8 charset is not set for them already. |
Done. |
…vascript-node version conflicts
LANGis unset in thejavascript-node(and inheritedtypescript-node) images, breaking UTF-8 rendering in locale-aware tools — e.g.tmux display-message -p "#{client_utf8}"returns0and Unicode characters fail to render.Changes
Dockerfiles: added
ENV LANG=C.UTF-8to bothsrc/javascript-node/.devcontainer/Dockerfileandsrc/typescript-node/.devcontainer/Dockerfile.Versions (patch bump):
javascript-node4.0.13 → 4.0.14,typescript-node5.0.1 → 5.0.2, with matching README tag examples.Tests: added a
lang-utf8check to each image'stest-project/test.shasserting$LANGequalsC.UTF-8.Notes
C.UTF-8is used rather thanen_US.UTF-8because it's always present in the base image without generating a locale, sidestepping the breaking-change concern raised in nodejs/docker-node#1839.