> I did create a preliminary document regarding language and codepages in us by
> FreeDOS at https://github.com/shidel/fd-nls/blob/master/LangCode.md
>
> You are all more than welcome to provide any corrections that may be needed.
> Or, provide supplementary information.
>
> Hopes are to eventually add this to the Docs in the FreeDOS Archive on GitLab
> and possibly someday in the releases.
>
> :-)

Just a little history and context, at least from my perspective.  Although I 
only speak and write English, I've needed to deal with some of the technical 
details of languages in DOS quite a bit for my keyboard-related programs.

DOS essentially divides the the implementation of languages/countries into four 
different categories: Country, Language, Code Page, and Keyboard Layout.  They 
are all very distinct yet highly inter-related.

MS-DOS, and even early versions of Windows, implemented these things before the 
modern era.  MS-DOS didn't have LANGuages like we do today.  The LANG 
environment variable in DOS is a modern development, and I'm not even sure 
exactly when or how it started.  It wasn't used in the early days of DOS.  Its 
use in DOS is really limited to what Languages are used for program output 
(menus, help screens, data gathering from the user, perhaps documentation, 
etc.).  But, this is indirectly related to and is affected by Code Pages, 
Countries, and Keyboard Layouts.

In DOS, COUNTRY really doesn't have anything to do with Country in the 
commonly-understood sense of the word (a geographical place with physical 
borders).  COUNTRY in DOS has more to do with number, currency, time/date 
formatting, and a few other things.  Instead of having separate formatting 
options for each of these (e.g., a Number_Format setting distinct from a 
Currency_Format setting) they combined the different "formatting 
sub-categories" into groups they called Countries.  There is certainly some 
value and logic to how the sub-categories were organized, but in hindsight it 
might have been better to just have separate sub-categories instead of groups.

E.g., the Euro didn't even exist until 1999 nearly 20 years after DOS was being 
developed (in the early 1980's), different currencies have emerged and 
disappeared and combined, etc. so the way things were in the early 1980's 
regarding currency formatting really doesn't apply (at least not universally) 
any more.  Similarly, we now have International standards for Country Codes 
(ISO 3166) and Language Codes (ISO 639), which didn't even exist in the early 
days of DOS and in some cases conflict with what Microsoft used for Country 
Codes way back when (though, as discussed above, COUNTRY to DOS isn't really 
the same thing as Country to ISO, so using ISO Country Codes, while an 
admirable goal, may not be all that realistic).

Code Pages and Keyboard Layouts are a whole other convoluted can of worms, and 
I won't go into a lot of detail.  I will just mention a couple of things.  MS 
had a "standard" which allows keyboard drivers to let other programs know that 
they are installed (some programs need/want to know that) but not all keyboard 
drivers implement the standard.  Granted, part of the issue is that there are 
conflicting details as to what "standard" keyboard layout codes should be (they 
are different than, yet related to, Countries and Languages), but I think 
keyboard drivers should at least try to implement the MS standard.

Even back when MS was starting DOS (early 1980's), there were 2 Code Pages for 
each Keyboard Layout (a main and a secondary).  In the modern era, there are 
way more than 2 code pages for some Keyboard Layouts (Languages/Countries).  In 
fact, for the English language, virtually ANY Code Page would work (at least 
ones where the first 128 characters of the Code Page follow the standard, which 
is almost all of them).

I just want to reiterate that this is what I see from my perspective, and 
others will most certainly disagree.  DOS currently has divided 
country/language support into four different technical categories which are all 
distinct yet highly inter-related.  I think a lot of confusion and 
consternation and frustration has arisen because we want to conflate the 
different categories and treat them as if they are all essentially the same 
because in some places they use some of the same terminology.  They absolutely 
are not the same.

I don't have a solution to this, nor am I proposing one.  I just know that the 
whole thing is a confusing mess and trying to work within the existing system 
is very, very frustrating.  I really do wish we could start over from scratch 
and "build a better mouse trap" when it comes to countries and languages in 
DOS, but I think we're way past the point where it would make any substantive 
difference.


_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to