-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
country.sys: codepage 667/790/991 (Mazovia) support #52
Comments
As a short to medium term solution I will port this from the FreeDOS country.sys. |
I'm myself interested in Mazovia only, but there are probably other examples where the FreeDOS country.sys is better/more complete than the EDR ersatz. I wonder how difficult it would be to translate FreeDOS country.sys into an EDR-format country.sys? either parsing the compiled version of FreeDOS' country.sys, or maybe mangling its source code to make it output something that EDR could understand? |
It would be awesome if the country.sys could be generated in multiple forms from a database-like "thing". That would be an interesting project in its own. All the information should be there already. Regarding cp 667/790/991, can you show me the commands how you configure your DOS environment? I am currently confused, because I have not found a reference to cp 667/790/991 in FreeDOS country.sys source at https://github.com/FDOS/country/blob/master/country.asm. |
Ha, you got me. I checked it on the FreeDOS PC that is configured with LANG=PL and I only now realize that my configuration is dysfunctional. Until now I used this:
It boots alright, but on closer examination I see that sorting and up-casing are definitely not right. I guess it must default to either CP437 or CP852. I did not notice this sooner because this configuration happen to work for some of the polish-specific glyphs and since I'm not a huge fan of 8-bit characters in filenames I never got to hit the cases that do not work. So the question would be: is there any reason to include in EDR something that does not exist in other DOSes? It's nothing really important, proof being that I used a malfunctioning configuration for decades without realizing it... If you'd be keen on adding support for Mazovia, I'd be happy to prepare the necessary upcase & sorting tables. |
It is a useful addition not causing that much work, so we will add it :-) If you could help with providing the tables, that would be great. Will happily add this to the EDR country.sys. Do you plan to make these tables "by hand" or extract them from anywhere? I When that is done, there probably should also be an issue opened at the FreeDOS country repo. |
Cool, give me some time, I will make these table by hand because I do not know of any source that could have them already. Will be back soon. :) |
I worked on the tables today. Here are my results. Feel free to skip the boring parts. :) Mazovia (CP 667 / CP 790) is based on CP437 and patches only a couple of bytes: 86h = ą The "Mazovia-zł" variant (known as CP 991 in FreeDOS) redefines one extra character: This variant does not require any change of upcasing nor sorting, the tables are identical as for CP 667/790. Regarding the COLLATE table, this is the difference with CP437 (ą, Ą, Ę, ń and Ń are already collated properly in CP437): 8Dh = ć -> collate as 'c' (67) So the full COLLATE table is this (based on CP437 from FreeDOS COUNTRY.SYS):
Now, UPCASING: 86h = ą -> 143 // already good in CP437 So the UPCASE table for Mazovia would look like this:
Is this usable to you? Let me know if you'd need it in another format or so. |
Looks good :-) I'll include it today afternoon. |
I am almost don with it. Question: can I substitute zł as zl for the currency in codepage 437? |
I'm not sure I understand the question. Is this about "what currency system should return when configured with COUNTRY=048,437,COUNTRY.SYS" ? If yes, then instead of "zl" I would rather suggest either "PLZ" (if we want to keep living in the 90s) or "PLN". Point being that I've never seen "zl" before so it looks very strange. Similar as to seeing "€" replaced by "E" (even though this I have seen already). |
Yes, it is about the currency symbol. According to Wikipedia, PLN is the currency code, not the symbol. But I will happily follow your judgement here and set PLN as currency for 437. |
The EDR country.sys supports Poland NLS under codepage 852. This mimics what MS-DOS did back in the day, but it wasn't a popular choice in Poland since Poles did not wait for Microsoft and created their own codepage named Mazovia that was far superior to the CP852 proposition.
FreeDOS (and SvarDOS) uses Mazovia for LANG=PL, so perhaps it would be possible to port this from their country.sys into the EDR country.sys? Alternatively, #51 would make this subject a non-issue.
The text was updated successfully, but these errors were encountered: