Skip to content

fix: Set JVM console encoding to IBM-1047 for Java 21#4482

Merged
hrishikesh-nalawade merged 4 commits intov3.x.xfrom
hrishikesh-nalawade/GH4419/console-encoding
Feb 3, 2026
Merged

fix: Set JVM console encoding to IBM-1047 for Java 21#4482
hrishikesh-nalawade merged 4 commits intov3.x.xfrom
hrishikesh-nalawade/GH4419/console-encoding

Conversation

@hrishikesh-nalawade
Copy link
Member

@hrishikesh-nalawade hrishikesh-nalawade commented Feb 3, 2026

Description

Java 21 (JEP 400) changed the default charset to UTF-8 for stdout/stderr. The z/OS SYSPRINT console expects EBCDIC (IBM-1047) encoding, causing UTF-8 bytes to display incorrectly. The existing -Dlogging.charset.console property only configures Logback's encoder and takes effect after Spring Boot initialization, not at JVM startup.

Added JVM-level properties for Java 21+ on z/OS:

  • -Dstdout.encoding=IBM-1047
  • -Dstderr.encoding=IBM-1047
    These properties configure the JVM's System.out and System.err streams immediately at startup, before any application code runs, ensuring all console output uses the correct EBCDIC encoding.

Linked to #4419

  • fix: Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc

Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
hrishikesh-nalawade and others added 3 commits February 3, 2026 19:42
Co-authored-by: Pablo Carle <pablocarle@users.noreply.github.com>
Signed-off-by: Hrishikesh Nalawade <167364362+hrishikesh-nalawade@users.noreply.github.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
…le-encoding' into hrishikesh-nalawade/GH4419/console-encoding
@pull-request-size pull-request-size bot added size/S and removed size/M labels Feb 3, 2026
@hrishikesh-nalawade hrishikesh-nalawade merged commit 0a636a4 into v3.x.x Feb 3, 2026
39 of 40 checks passed
@hrishikesh-nalawade hrishikesh-nalawade deleted the hrishikesh-nalawade/GH4419/console-encoding branch February 3, 2026 15:38
Goutham024 pushed a commit to Joe-Winchester/api-layer-OIDC-POC that referenced this pull request Feb 4, 2026
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: Hrishikesh Nalawade <167364362+hrishikesh-nalawade@users.noreply.github.com>
Co-authored-by: Pablo Carle <pablocarle@users.noreply.github.com>
Signed-off-by: Gowtham Selvaraj <Gowtham.Selvaraj1@ibm.com>
Goutham024 pushed a commit to Joe-Winchester/api-layer-OIDC-POC that referenced this pull request Feb 4, 2026
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: Hrishikesh Nalawade <167364362+hrishikesh-nalawade@users.noreply.github.com>
Co-authored-by: Pablo Carle <pablocarle@users.noreply.github.com>
Signed-off-by: Gowtham Selvaraj <Gowtham.Selvaraj1@ibm.com>
Goutham024 pushed a commit to Joe-Winchester/api-layer-OIDC-POC that referenced this pull request Feb 4, 2026
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: Hrishikesh Nalawade <167364362+hrishikesh-nalawade@users.noreply.github.com>
Co-authored-by: Pablo Carle <pablocarle@users.noreply.github.com>
Signed-off-by: Gowtham Selvaraj <Gowtham.Selvaraj1@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

2 participants