<i>Setting of system encoding isn't applied to stdout on certain circumstances</i> status still Open with 3 other changes
by
.
D 2025-08-17T06:33:28.143
J icomment I\sam\sactually\sconfused\sby\sthat\stest.\sWhen\sthe\schild\sprocess\sruns\sthe\s`encoding\ssystem\sis2022-jp`\scommand,\sstdout\sis\salready\sopen\sisn't\sit?\sAfaik,\schanging\ssystem\sencoding\swill\snot\schange\sencoding\son\sexisting\schannels\sso\swhy\sdoes\sthe\stest\sexpect\sit\swill\soutput\sthe\scharacters\sin\siso2022-jp?\r\n\r\nAnd\sto\sfurther\sthe\sconfusion,\swhy\swould\sthe\stest\sfail\sin\syour\sapn-oo-lazy-init-sbmod\sbut\snot\sin\sapn-oo-lazy-init\sor\smain?\r\n\r\nI'm\sspeculating\sthat\sthe\sdifference\sis\sthe\spoint\sat\swhich\sthe\sstdout\schannel\sis\sopened.\sIf\sit\swas\salready\sopen,\sthe\stest\swould\sfail\sbut\sit\sis\snot\sobvious\slooking\sat\sthe\sdiffs\swhy\sthe\stwo\sbranches\swould\sdiffer\sin\sthat\srespect.\sMay\sbe\seither\sObjPrintf\sor\sthe\sPkg*\srelated\scalls\sin\sapn-oo-lazy-init-sbmod\scause\sstdout\sto\sbe\sopened\searlier?\sCan't\sthink\sof\swhat\selse\sit\smight\sbe\swithout\sfurther\sinvestigation.
J login apnadkarni
J mimetype text/x-markdown
K 8a13caa31dd8e3a546b8d44c235bb98cd52bd774
U apnadkarni
Z 20defc239ca0e2ca94c5899b026283d9