Page 2 of 2

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 13:03
by terrytw
admin wrote: 13 Mar 2023 12:12 With v24.20.0102 try flags 4 and 8 please:

Code: Select all

text runret("cmd /c chcp 65001 & cmd /c dir Path-to-Test", , 65001, 4);

text runret("cmd /c chcp 65001 & cmd /c dir Path-to-Test", , 65001, 8);
flags 8 almost worked!

Windows 10 22H2
XYplorer 24.20.0102

Code: Select all

text runret("cmd /c chcp 65001 & cmd /c dir E:\Downloads\Test", , 65001, 4);

Code: Select all

Active code page: 65001
 Volume in drive E is ?a��??��?��????
 Volume Serial Number is 7D73-CD00

 Directory of E:\Downloads\Test

2023/03/12  18:50    <DIR>          .
2023/03/12  18:50    <DIR>          ..
2023/03/12  18:02                 0 Ex16-��??����?-XiaoWu(HP)-1080.txt
2023/03/12  18:05                 0 VAM Zero ��??����? ������??��~1.txt
2023/03/12  18:05                 0 VAM Zero ��??����??o��??��.txt
2023/03/12  18:05                 0 VAM Zero ��??����?��a����??��??��1?.txt
2023/03/12  18:03                 0 VAM-?��쨦??-��??����?-??��??����??��??.txt
2023/03/12  18:03                 0 VAM-��??����?-??�訦��???�騨�ꡭ-8??o??��-1080P.txt
2023/03/12  18:03                 0 VAM??�???????��쨦??��??����??????????.txt
2023/03/12  18:22                 0 ?��?????????�� ?��??o����-����-����??����?.txt
2023/03/12  18:04                 0 ?��?????????��+?��??o����-����-����??����?.txt
2023/03/12  18:04                 0 ��??����?4K.txt
2023/03/12  18:04                 0 ��????????������2-��??����?-?���??��~1.txt
              11 File(s)              0 bytes
               2 Dir(s)  79,937,593,344 bytes free

Code: Select all

text runret("cmd /c chcp 65001 & cmd /c dir E:\Downloads\Test", , 65001, 8);

Code: Select all

Active code page: 65001
 Volume in drive E is 媒体磁盘
 Volume Serial Number is 7D73-CD00

 Directory of E:\Downloads\Test

2023/03/12  18:50    <DIR>          .
2023/03/12  18:50    <DIR>          ..
2023/03/12  18:02                 0 Ex16-迟钝-XiaoWu(HP)-1080.txt
2023/03/12  18:05                 0 VAM Zero 迟钝 酒吧~1.txt
2023/03/12  18:05                 0 VAM Zero 迟钝交易.txt
2023/03/12  18:05                 0 VAM Zero 迟钝骑马舞蹈.txt
2023/03/12  18:03                 0 VAM-大陆-迟钝-可爱韩舞.txt
2023/03/12  18:03                 0 VAM-迟钝-古风换装-8场景-1080P.txt
2023/03/12  18:03                 0 VAM开心:大陆迟钝与信�?txt
2023/03/12  18:22                 0 好玩搞笑 夜店魅魔迟钝.txt
2023/03/12  18:04                 0 好玩搞笑+夜店魅魔迟钝.txt
2023/03/12  18:04                 0 迟钝4K.txt
2023/03/12  18:04                 0 霸王传说2-迟钝-剧情~1.txt
              11 File(s)              0 bytes
               2 Dir(s)  79,937,593,344 bytes free

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 13:07
by admin
almost! I hate this word, it's so analog. In computers it should either work or fail -- completely! :)

:blackstorm: :maf:

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 13:25
by terrytw
I don't know if it helps or not, now I try to use

Code: Select all

cmd type
to recreate the same problem, so you have more sample texts...

This is content of a utf-8 txt file, with CRLF EOL.

Code: Select all

总部位于加州的硅谷银行在1983年成立,倒闭前是美国第16大商业银行。截至2022年12月31日,该行拥有约2090亿美元资产,旗下存款规模达1754亿美元,也是硅谷本地存款最多的银行。硅谷银行主要为科技初创企业融资,与美国近半初创公司及去年44%在美上市的技术和医疗公司都有业务来往。其著名客户包括Pinterest、ZipRecruiter和Shopify。硅谷银行的成功关键在于深深嵌入了初创世界的结构中,初创企业一旦加入硅谷银行的“生态系统”就可参与大量活动,结识其他投资者和创始人,这让许多初创不得不与该银行合作。
2. 如何在48小时内倒闭?
一言蔽之,硅谷银行因为挤兑潮(挤提)导致资不抵债。
3月8日,硅谷银行宣布筹集22.5亿美元资金,以弥补债券投资亏损。这触发市场信心,客户纷纷提取存款。
3月9日,该行母企股价暴跌六成,创20多年最大跌幅。投资者和存户总计提取了420亿美元存款,使该银行的现金余额跌至负9.58亿美元。

Code: Select all

text runret("cmd /c chcp 65001 & cmd /c type E:\Downloads\test.txt", , 65001, 8);

Code: Select all

Active code page: 65001
总部位于加州的硅谷银行在1983年成立,倒闭前是美国�?6大商业银行。截�?022�?2�?1日,该行拥有�?090亿美元资产,旗下存款规模�?754亿美元,也是硅谷本地存款最多的银行。硅谷银行主要为科技初创企业融资,与美国近半初创公司及去�?4%在美上市的技术和医疗公司都有业务来往。其著名客户包括Pinterest、ZipRecruiter和Shopify。硅谷银行的成功关键在于深深嵌入了初创世界的结构中,初创企业一旦加入硅谷银行的“生态系统”就可参与大量活动,结识其他投资者和创始人,这让许多初创不得不与该银行合作�?
2. 如何�?8小时内倒闭�?
一言蔽之,硅谷银行因为挤兑潮(挤提)导致资不抵债�?
3�?日,硅谷银行宣布筹集22.5亿美元资金,以弥补债券投资亏损。这触发市场信心,客户纷纷提取存款�?
3�?日,该行母企股价暴跌六成,创20多年最大跌幅。投资者和存户总计提取�?20亿美元存款,使该银行的现金余额跌至负9.58亿美元�?

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 14:30
by admin
For the record, I changed my system to Simplified Chinese, but it brings me only this far:

Code: Select all

System / Thread Locale ID: 2052 (zh-CN) / 1033 (en-US)
Default ANSI Code Page: 1252  (ANSI - Latin I)
Active ANSI Code Page: 936   (ANSI/OEM - Simplified Chinese GBK)
Default OEM code page: 437   (OEM - United States)
Active OEM Code Page: 936   (ANSI/OEM - Simplified Chinese GBK)
DBCS Code Page: Yes
The result of runret now is total garbage with any setting. For example with flags=8:

Code: Select all

Active code page: 65001
 Volume in drive E is Volume
 Volume Serial Number is 00B1-51DC

 Directory of E:\Test\Charsets ?����????oo\??��?o???����?2?���?-|\runret

03/12/2023  02:00 PM    <DIR>          .
03/12/2023  02:00 PM    <DIR>          ..
03/12/2023  05:09 PM                 0 Ex16-��??����?-XiaoWu(HP)-1080.txt
03/12/2023  01:59 PM                 0 VAM Zero ��??����? ������??��~1.txt
03/12/2023  01:59 PM                 0 VAM Zero ��??����??o��??��.txt
03/12/2023  01:59 PM                 0 VAM Zero ��??����?��a����??��??��1?.txt
03/12/2023  01:59 PM                 0 VAM-?��쨦??-��??����?-??��??����??��??.txt
03/12/2023  01:59 PM                 0 VAM-��??����?-??�訦��???�騨�ꡭ-8??o??��-1080P.txt
03/12/2023  01:59 PM                 0 VAM??�???????��쨦??��??����??????????.txt
03/12/2023  01:59 PM                 0 ?��?????????�� ?��??o����-����-����??����?.txt
03/12/2023  01:59 PM                 0 ?��?????????��+?��??o����-����-����??����?.txt
03/12/2023  01:59 PM                 0 ��??����?4K.txt
03/12/2023  01:59 PM                 0 ��????????������2-��??����?-?���??��~1.txt
              11 File(s)              0 bytes
               2 Dir(s)  49,077,030,912 bytes free
2023-03-13_142943.png
Currently out of ideas. Need more time... :maf:

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 14:52
by admin
Try flags 24 with v24.20.0103. But my hopes are not very high.

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 15:05
by terrytw
No luck...

Code: Select all

text runret("cmd /c chcp 65001 & cmd /c dir E:\Downloads\Test", , 65001, 24);

Code: Select all

Active code page: 65001
 Volume in drive E is ?a��??��?��????
 Volume Serial Number is 7D73-CD00

 Directory of E:\Downloads\Test

2023/03/12  18:50    <DIR>          .
2023/03/12  18:50    <DIR>          ..
2023/03/12  18:02                 0 Ex16-��??����?-XiaoWu(HP)-1080.txt
2023/03/12  18:05                 0 VAM Zero ��??����? ������??��~1.txt
2023/03/12  18:05                 0 VAM Zero ��??����??o��??��.txt
2023/03/12  18:05                 0 VAM Zero ��??����?��a����??��??��1?.txt
2023/03/12  18:03                 0 VAM-?��쨦??-��??����?-??��??����??��??.txt
2023/03/12  18:03                 0 VAM-��??����?-??�訦��???�騨�ꡭ-8??o??��-1080P.txt
2023/03/12  18:03                 0 VAM??�???????��쨦??��??����??????????.txt
2023/03/12  18:22                 0 ?��?????????�� ?��??o����-����-����??����?.txt
2023/03/12  18:04                 0 ?��?????????��+?��??o����-����-����??����?.txt
2023/03/12  18:04                 0 ��??����?4K.txt
2023/03/12  18:04                 0 ��????????������2-��??����?-?���??��~1.txt
              11 File(s)              0 bytes
               2 Dir(s)  79,937,589,248 bytes free

Re: "runret" not dealing with Chinese characters correctly

Posted: 13 Mar 2023 21:36
by admin
I'm pretty optimistic regarding the next beta... :cup:

Re: "runret" not dealing with Chinese characters correctly

Posted: 14 Mar 2023 02:29
by terrytw
admin wrote: 13 Mar 2023 21:36 I'm pretty optimistic regarding the next beta... :cup:
Yes! It works now! Thank you :biggrin: