Open Wengier opened 3 years ago
@Wengier I was able to use LFN's source for this as well. Thank you very much.
It is DBCS support in DOSVAXJ3, but there is no problem about Japanese. I don't think it is necessary to support other languages due to the nature of the software. As for copy-paste, I will port it myself if necessary. Thank you very much for your attention to this matter.
@nanshiki The LFN code had diverged a bit from the current DOSBox-X code. For example, in my original DOSBox LFN branch, the LFN handles were not used. This could cause problems with some LFN-compatible programs. LFN handles were added later when I worked on DOSBox-X. Also, LFN support on FAT drives is not so straightforward to port, as DOSBox-X supports more things like FAT32 drives (the support code for FAT32 drives is pretty long too, scattered in different files). So unless you also want features like FAT32 support, we cannot just copy the current code in DOSBox-X. In any case, I have opened a PR (#3) to improve LFN support in the code. You can let me know if you are also interested in FAT32 support.
For Japanese support on local drives, I think it probably works only if you set the Japanese locale in your Windows system. Otherwise Japanese filenames may not show up at all (but they will show up in DOSBox-X with code page 932). You may want to verify this yourself.
@nanshiki I made a test branch to do code page conversion for Japanese (932) in Windows as in DOSBox-X so that Japanese files should show up even in a non-Japanese locale. But the coding is more complicated than I originally thought, so more testing is still needed. The commit is here: https://github.com/nanshiki/DOSVAXJ3/commit/d9c51d261b7f4aec66852c3c8799be77e129af63
@Wengier Thank you. I would like to take some time to check the operation.
@Wengier Sorry for creating this, but it is not necessary for DOSVAXJ3 to run on other language environment OS. Stable operation in a Japanese environment is the highest priority, so I am very sorry, but the adoption of this code-page-related modification will be put on hold for the time being.
@nanshiki The code page conversion branch is only intended for testing and demonstrating how it works, and it is not ready for production yet, so I did not included it in my PR (indeed, the coding part is more complicated than I originally thought). If there is no need to support DOSVAXJ3 to run on other language environment OS, then definitely there is no need to use it. Thanks.
@nanshiki I re-worked on the code page conversion branch and made updates, and the new version certainly appears to be more stable than the previous one (the current code is here: https://github.com/nanshiki/DOSVAXJ3/compare/master...Wengier:master). But due to the nature of the code it may still need to be tested a bit more in order to see if there are further issues. I made it mainly in the hope that someone may find it helpful; there is no need to replace the main branch unless/until it is confirmed to be fully stable. In addition, the code contains small changes which allows users to break from DIR /P with Ctrl+C and fix multi-line delete as in DOSBox-X, which may be useful for some users.
@Wengier I tried the codepage conversion, but I can't seem to build it on Linux. The DIR/P and multi-line deletion have been merged. Thanks.
@nanshiki It turns out that it is more difficult than I originally thought to make the codepage conversation work on different platforms, but glad to see the other stuff got merged. I also work on the DOSBox Staging project (which I’d like to add CJK support eventually), and I really hope I have more time to look at this.
@nanshiki I have updated the codepage conversion branch, so that the code should now build in both Windows and Linux platforms. Japanese filenames appear to show just fine in my non-Japanese Windows and Linux systems:
https://github.com/Wengier/DOSVAXJ3/commit/1add804bd0dcb3c508923c20efb9a95ec48518be
@nanshiki You can let me know if you find any issue(s) with the codepage conversion in either Windows or Linux platform. Hope it works for you as well.
@Wengier I'm so busy that I don't seem to be able to work for a while. Please wait.
@Wengier I checked. On Linux, localDrive::FindNext() called dirCache.GetExpandName() twice, resulting in all files being directories.
Also, on non-Japanese versions of Windows, the short file names are numbers and alphabetic characters. This is because the cAlternateFileName in WIN32_FIND_DATA returned by FindFirstFile(),FindNextFile() is so, but in Japanese environment, I would like to use notation like 漢字~1.
I have already fixed these two points, and will merge them in after I check the operation a little more. Thanks.
@Wengier I was able to confirm the operation and merged it. Thank you very much.
@nanshiki Glad to hear that the function works as expected.
By the way, I remember that you added support for DOS/V applications when country information is set to Japan in DOSBox-X’s TTF output. In more recent versions CJK characters can be displayed in non-TTF outputs as well (see the section “Standard outputs with CJK support” in the Wiki page: https://dosbox-x.com/wiki/Guide%3AEast-Asian-language-support-in-DOSBox%E2%80%90X), with the help of DOS/V fonts. I wonder if DOS/V applications can be supported in such outputs too? Thanks.
@Wengier DOS/V application in output mode other than TTF, but it works, but as with TTF, there are display problems due to the difference between attribute blinking and high brightness.
Hi @nanshiki! Thanks a lot for your work on Japanese support in DOSVAXJ3. They really work great, and I ported some features and extended them in DOSBox-X accordingly as you were aware of. The system IME support on Linux platform was virtually the only main feature that I was not able to confirm by myself (possibly due to some issue in my Linux VM), which was why I asked your help to confirm it works. But the system IME support on Windows platforms really works great with the current code - thanks to your work. As a whole I greatly appreciate the help from you.
Meanwhile, I have seen that DOSBOXJ3 includes features like LFN support. The code was based on my original DOSBox SVN-lfn branch and accordingly it does not support functions like listing DBCS filenames on mounted local drives or LFN support on FAT drives, which are available in DOSBox-X. And for the clipboard feature, it supports text selection and copy via mouse buttons but not via keyboard keys. Are you interested in such features? If so, I will implement them for DOSVAXJ3. Please also feel free to let me know if you need any other assistance.