Hi Mateusz,

>>> But there is a problem: all NLS (translation) files that come with the
>>> system are being encoded in a specific single codepage for every
>>> language. If the user uses a different codepage, all messages will be
>> 
>> How did MS-DOS handle that for their help files and messages?
>> Dunno.
>> MS-DOS provided several codepages for a single language/country, but
>> only a single binary with a bunch of messages encoded for a single codepage.
> 
> AFAIK everything was hardcoded in a single codepage, and switching to 
> another codepage led to messages and help screens getting all garbled. 
> At least that's how it was on Polish and French versions of MS-DOS, but 
> I doubt other versions had any smart codepage-adjustments...

Currently, the following ideas came to my mind. Each has its pros and
cons, of course.

1) The obvious, but lame:
- Provide different NLS files for the different codepages for each
language by hand.
- That requires a different naming scheme for the files, e.g., you need
to put "437" or "850" somewhere in the filename. This gives you 3 to 5
chars less for the rest of the filename. :-(

2) Less clutter requires more magic:
- Same as 1), but put all strings into a single NLS file to keep the
current file-naming scheme.
- Requires recompiling all programs and probably changes to the Kitten
library. (Never used it, so not sure.)
- NLS files are harder to edit and there's a chance, that you ruin a
file's encoding, if you use an editor, that tries to automatically
detect the encoding.
- Instead it might be a good idea to have one source NLS file encoded in
UTF8 and have an NLS file "compiler" for converting from that source
file to the different codepages for that language.
- Probably one could do some (size) optimization:
  1) Let's assume, SvarDOS is currently using codepage 850.
  2) Start an NLS-aware software.
  3) The software should look for, e.g., "0.0.850:SVARDOS INSTALLATION"
     first.
  4) If that doesn't exist, because it's a simple a-zA-Z string, then
     fall back to "0.0:SVARDOS INSTALLATION".
  5) That way, the NLS file compiled by the converter could be shorter,
     because it would contain codepage-specific versions of
     messages only, when needed.

3) On the fly:
- Only provide UTF8-encoded NLS files and add some on-the-fly conversion
for the current codepage to the Kitten lib.
- Requires recompiling all programs and makes them a little larger.

Cheers,
Robert
-- 
              +++ BTTR Software +++
     Home page: https://www.bttr-software.de/
DOS ain't dead: https://www.bttr-software.de/forum/

_______________________________________________
Svardos-users mailing list
Svardos-users@lists.osdn.me
https://lists.osdn.me/mailman/listinfo/svardos-users

Reply via email to