Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help capturng unicoded directory names
#18
Give the following program a test run (change paths as necessary):

Code: (Select All)
$Console:Only

Shell "CHCP 437"
Shell "dir Z:\test\*.* > temp.txt"
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, text$
Print text$
Loop
Close

Shell "CHCP 65001"
Shell "dir Z:\test\*.* > temp.txt"
Open "temp.txt" For Input As #1
Do Until EOF(1)
Line Input #1, text$
Print text$
Loop




Quote:Active code page: 437
Volume in drive Z is RamDisk
Volume Serial Number is 30D1-E851

Directory of Z:\test

12/17/2024 10:04 PM <DIR> .
12/17/2024 12:45 PM <DIR> Vol.08 Ch.0040 (en) [?????? Scan]
12/17/2024 12:45 PM <DIR> Vol.09 Ch.0041 (en) [?????? Scan]
0 File(s) 0 bytes
3 Dir(s) 8,427,694,080 bytes free
Active code page: 65001
Volume in drive Z is RamDisk
Volume Serial Number is 30D1-E851

Directory of Z:\test

12/17/2024 10:04 PM <DIR> .
12/17/2024 12:45 PM <DIR> Vol.08 Ch.0040 (en) [一人の新しい Scan]
12/17/2024 12:45 PM <DIR> Vol.09 Ch.0041 (en) [一人の新しい Scan]
0 File(s) 0 bytes
3 Dir(s) 8,427,694,080 bytes free

Press any key to continue

You can see the difference in the output above for me.

You need a proper font set, and then the proper unicode codepage (65001), and then it works without issue on my machine.

And you should be able to use one of these to set the console font:

_ConsoleFont "Lucida Console", 20
_ConsoleFont "Consolas", 24
_ConsoleFont "Courier New", 16
Reply


Messages In This Thread
RE: Need help capturng unicoded directory names - by SMcNeill - 9 hours ago



Users browsing this thread: 6 Guest(s)