Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 71ced54c5e5a361887d41065c9bb64dcb58347630c8b005694b05c78a7ae32b4
Ticket: 8a13caa31dd8e3a546b8d44c235bb98cd52bd774
Setting of system encoding isn't applied to stdout on certain circumstances
User & Date: apnadkarni on 2025-08-17 06:33:28
Changes

  1. icomment:
    I am actually confused by that test. When the child process runs the `encoding system is2022-jp` command, stdout is already open isn't it? Afaik, changing system encoding will not change encoding on existing channels so why does the test expect it will output the characters in iso2022-jp?
    
    And to further the confusion, why would the test fail in your apn-oo-lazy-init-sbmod but not in apn-oo-lazy-init or main?
    
    I'm speculating that the difference is the point at which the stdout channel is opened. If it was already open, the test would fail but it is not obvious looking at the diffs why the two branches would differ in that respect. May be either ObjPrintf or the Pkg* related calls in apn-oo-lazy-init-sbmod cause stdout to be opened earlier? Can't think of what else it might be without further investigation.
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"