Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Unicode API support #142

Open
7 tasks
davidrg opened this issue Dec 21, 2022 · 0 comments
Open
7 tasks

Add Unicode API support #142

davidrg opened this issue Dec 21, 2022 · 0 comments

Comments

@davidrg
Copy link
Owner

davidrg commented Dec 21, 2022

While the terminal emulator and text processing with CKW handles unicode just fine, CKW (and Kermit 95 before it) only uses the ANSI Windows APIs (eg, CreateFileA). This means it struggles to deal with filenames that use unicode characters, among other issues. This is likely to retain compatibility with Windows 95/98/ME which don't do Unicode.

Now that the build of CKW most people will use doesn't run on Windows 9x, we really should be able to compile CKW with full Unicode support. This will be quite a big job.

  • Unicode will need to be turned on at compile time. This might just be a /DUNICODE and a /D_UNICODE:
    • Always enable UNICODE when building Visual C++ 2008 or newer as these compilers can't target Windows 9x anyway
    • Enable UNICODE by default when building with a compiler that has the Microsoft Layer for Unicode available (UNICOWS.DLL). This will be Visual C++ 2003 and 2005 at a minimum.
    • Optionally enable UNICODE for older compilers at the cost of Windows 9x support, to allow for optionally producing a unicode-enabled NT-only build
  • C-Kermit has its own UNICODE #define which may or may not conflict - this will need inspecting
  • All Win32 API calls will have to be checked and strings going in and out of them will need to be unicode
  • All calls to GetProcAddress will have to be checked as this is often used to deal with Win32 APIs that aren't available on older versions of Windows. So situations like GetProcAddress(hKernel, "GetLongPathNameA") will need to be changed to GetProcAddress(hKernel, "GetLongPathNameW") when building with Unicode support.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant