shidel / fd-nls

Language contributions and submissions for software related to FreeDOS
GNU General Public License v2.0
24 stars 17 forks source link

Non-Latin language support #149

Open HeavySnowJakarta opened 1 year ago

HeavySnowJakarta commented 1 year ago

For non-Latin-based languages, like Russian and Chinese, does FreeDOS provide the correct fonts? Should they be in Unicode?

shidel commented 1 year ago

Hi, yes DOS does have many non-Latin based fonts available. However, it can be a little tricky knowing how to switch to the proper Code Page so the text for those languages is displayed correctly. For some languages (like Russian), the FreeDOS installer can set this information in the autoexec file and configure DOS at boot. The steps needed to do that are in a directory related to that project. RU/SETLANG.BAT However, there is no such file for Chinese. Nor are additional languages for the installer being added at this time.

As for your UTF question. Nearly all DOS programs only support CODEPAGE Ascii characters and not UTF. But, those are difficult to work in and are easy to corrupt. Submissions should here should include both versions. See the FC program for example. It has both Program and Help NLS.

HeavySnowJakarta commented 1 year ago

Hi, yes DOS does have many non-Latin based fonts available. However, it can be a little tricky knowing how to switch to the proper Code Page so the text for those languages is displayed correctly. For some languages (like Russian), the FreeDOS installer can set this information in the autoexec file and configure DOS at boot. The steps needed to do that are in a directory related to that project. RU/SETLANG.BAT However, there is no such file for Chinese. Nor are additional languages for the installer being added at this time.

As for your UTF question. Nearly all DOS programs only support CODEPAGE Ascii characters and not UTF. But, those are difficult to work in and are easy to corrupt. Submissions should here should include both versions. See the FC program for example. It has both Program and Help NLS.

That's to say as I add an entirely new language, I should create a configure file, right? Should I provide the l10n file in both ANSI and UTF-8?

shidel commented 1 year ago

Hi, I'm not sure what you are referring to when you say "configuration file." If you you are referring to the configuration file for the installer... At present, the installer is not having any additional languages added to the installer itself. Being batch file based, there is a good deal of overhead involved with making the selection menu work and it is not currently able to scroll or such advanced things. In the future, the underlying utilities will be updated to make that process much easier and additional languages will be added at that time. The entries on that menu also require special font files that can be loaded and unloaded multiple times. So there are several things which need to happen before any more languages are added to the list in the installer. But, it would not hurt to provide the config file for when that eventually happens. Also, creating the font file is not extremely difficult either. But neither is required for providing translations for the individual programs. The language settings can be changed after FreeDOS is installed and any translations for that language can be used by those programs at that time.

Yes. Both standard Ascii Codepage versions and a UTF-8 version should be supplied. The codepage versions are the ones that actually get used by the DOS programs for language translations. But unfortunately, it is very easy to mangle the characters in the codepage text files when/if modifed on most modern editors. So, having a UTF-8 version provides a reliable way to edit the translation or repair the codepage versions.

Eventually, the FD-NLS Desktop application will handle all of that and it won't be something translators will need to worry about. But, I have not had the time to work on the app in a while and the program has not been extended beyond it's current capabilities. At present, it only can edit the package descriptions that are used by programs like FDIMPLES to display information on packages. If you are unfamiliar with FDIMPLES, it comes with FreeDOS and allows easy browsing, installation and removal of packages in a way similar to package management software on Linux.

I suggest possible starting with using the FD-NLS Desktop app to translate the package description information first. It is very helpful to non-english speaking users when they are trying to figure out what additional software the want to install. Once the FD-NLS App is setup for a new language, it is fairly easy to perform the translations. It even has a DOS preview window. There is no "save" button. That all happens automatically in the background along with the generation of both Ascii Codepage and UTF-8 versions.

To use the app... You clone this repo and point the app at that directory. Then set up the new language. Setting up a new language isn't too bad. Basically, you just add the new one, add a DOS font file for that language's codepage (if needed), and edit the UTF-8 to Codepage mapping data if required in the app. Once that is setup, it is pretty easy to use.

Eventually, the app will be able to push commits. But, for now that must be done manually. You would want to submit all the new stuff under the fd-nls path. (those would be the new font, language mapping data, etc) And the new package list information, under the packages directory.

Eventually, all the git stuff and ability to work on translations for individual programs will make it into the FD-NLS Desktop app. But, I've been far to busy with other things related to FreeDOS to work on it. Someday, hopefully I'll get back to working on it.

If you want to give it a try, there are downloads for Mac, Linux and Windows available at https://up.lod.bz

cardpuncher commented 1 year ago

Hi, I think he meant a configuration batch file like for Russian. That said unlike Latin, Greek or Cyrillic alphabets, I fear the glyph number needed by Chinese may be in the thousands.

FYI, there was a pull request for the kernel at https://github.com/FDOS/kernel/pull/88 to add Chinese support but unfortunately the CJKDOS.IMG file doesn't seem to be free software, so it cannot be included -- unless its authors accept to release it under a free license.

I believe pinging @4Darmygeometry may be a good idea.

4Darmygeometry commented 1 year ago

For non-Latin-based languages, like Russian and Chinese, does FreeDOS provide the correct fonts? Should they be in Unicode?

Japanese and korean also can't display in FreeDOS now.

4Darmygeometry commented 1 year ago

The above image is FMDUOS project using FreeDOS kernel and GBKDOS(CJKDOS) model. Chinese character is displayed in the computer.

CJKDOS.IMG isn't programming by me, it's programming by others in 1997, so I can't provide the source of CJKDOS. I hope you can research the  method of Chinese display, such as view the source of CCDOS by reading 《CCDOS源代码剖析(CCDOS source analyze)》(CCDOS is a free software that make DOS support Chinese). If FreeDOS can support Chinese, Japanese and Korean display, UEFI boot in future, I think more and more people will use it, instead be active in a small circle. -4Darmygeometry 2023/2/10  

何世恒管理学院 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年2月9日(星期四) 凌晨4:38 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [shidel/fd-nls] Non-Latin language support (Issue #149)

Hi, I think he meant a configuration batch file like for Russian. That said unlike Latin, Greek or Cyrillic alphabets, I fear the glyph number needed by Chinese may be in the thousands.

FYI, there was a pull request for the kernel at FDOS/kernel#88 to add Chinese support but unfortunately the CJKDOS.IMG file doesn't seem to be free software, so it cannot be included -- unless its authors accept to release it under a free license.

I believe pinging @4Darmygeometry may be a good idea.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

HeavySnowJakarta commented 1 year ago

The above image is FMDUOS project using FreeDOS kernel and GBKDOS(CJKDOS) model. Chinese character is displayed in the computer.

CJKDOS.IMG isn't programming by me, it's programming by others in 1997, so I can't provide the source of CJKDOS. I hope you can research the  method of Chinese display, such as view the source of CCDOS by reading 《CCDOS源代码剖析(CCDOS source analyze)》(CCDOS is a free software that make DOS support Chinese). If FreeDOS can support Chinese, Japanese and Korean display, UEFI boot in future, I think more and more people will use it, instead be active in a small circle.

-4Darmygeometry 2023/2/10

 

何世恒管理学院

@.***

 

------------------ 原始邮件 ------------------

发件人: @.***>;

发送时间: 2023年2月9日(星期四) 凌晨4:38

收件人: @.***>;

抄送: @.>; @.>;

主题: Re: [shidel/fd-nls] Non-Latin language support (Issue #149)

Hi, I think he meant a configuration batch file like for Russian. That said unlike Latin, Greek or Cyrillic alphabets, I fear the glyph number needed by Chinese may be in the thousands.

FYI, there was a pull request for the kernel at FDOS/kernel#88 to add Chinese support but unfortunately the CJKDOS.IMG file doesn't seem to be free software, so it cannot be included -- unless its authors accept to release it under a free license.

I believe pinging @4Darmygeometry may be a good idea.

Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you were mentioned.Message ID: @.***>

I’ve sent an email to Wengier, the host of The New DOS Time where cjkdos is recommended. Otherwise, I don't know how to get in touch with the author. If everything goes finely, the author may release it open-source, but now I can not tell what it’ll be.

HeavySnowJakarta commented 1 year ago

Chinese used Chinese character systems, a program to read and input Chinese, and cjkdos may be one of them (although I never used it before). Without it we can still display Chinese characters with correct fonts, but input methods are still needed as inputting Chinese is not just like changing the keyboard setting and letting it work then. Japanese may be even harder as most programs supported PC-98 instead of IBM PC.

HeavySnowJakarta commented 1 year ago

Btw, Unicode fonts are usually not provided in Chinese character systems. If you want the programs in the future (if there would be) to be modern, Unicode fonts have to be considered seriously. Thus, just adding a “special system” solves many but not all problems.

4Darmygeometry commented 1 year ago

I know. My programming level is limited, so I can't let FreeDOS to display Unicode and GBK characters. I hope FreeDOS can support Unicode, display Unicode character in pure DOS mode and graphic mode, not only phonograms. Thanks. -4Darmygeometry 2023/2/10  

何世恒管理学院 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年2月10日(星期五) 晚上11:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [shidel/fd-nls] Non-Latin language support (Issue #149)

Btw, Unicode fonts are usually not provided in Chinese character systems. If you want the programs in the future (if there would be) to be modern, Unicode fonts have to be considered seriously. Thus, just adding a “special system” solves many but not all problems.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

HeavySnowJakarta commented 1 year ago

I know. My programming level is limited, so I can't let FreeDOS to display Unicode and GBK characters. I hope FreeDOS can support Unicode, display Unicode character in pure DOS mode and graphic mode, not only phonograms. Thanks.

-4Darmygeometry 2023/2/10

 

何世恒管理学院

@.***

 

------------------ 原始邮件 ------------------

发件人: @.***>;

发送时间: 2023年2月10日(星期五) 晚上11:39

收件人: @.***>;

抄送: @.>; @.>;

主题: Re: [shidel/fd-nls] Non-Latin language support (Issue #149)

Btw, Unicode fonts are usually not provided in Chinese character systems. If you want the programs in the future (if there would be) to be modern, Unicode fonts have to be considered seriously. Thus, just adding a “special system” solves many but not all problems.

Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you were mentioned.Message ID: @.***>

It should support that. ANSI (native) is needed for old (commercial) programs and Unicode for “modern” ones (although not enough so far).

cardpuncher commented 1 year ago

On 10.02.2023 18:21, HeavySnowJakarta wrote:

I’ve sent an email to Wengier, the host of /The New DOS Time/ where cjkdos is recommended. Otherwise, I don't know how to get in touch with the author. If everything goes finely, the author may release it open-source, but now I can not tell what it’ll be.

Let's hope for the best. CJK stands for Chinese, Japanese, Korean, right?

Also, it seems Wengier has a GitHub account: https://github.com/Wengier. He has DOS related repositories, so chances are it's him. Maybe it would make sense to ping him so that he can comment here?

HeavySnowJakarta commented 1 year ago

On 10.02.2023 18:21, HeavySnowJakarta wrote:

I’ve sent an email to Wengier, the host of /The New DOS Time/ where cjkdos is recommended. Otherwise, I don't know how to get in touch with the author. If everything goes finely, the author may release it open-source, but now I can not tell what it’ll be.

Let's hope for the best. CJK stands for Chinese, Japanese, Korean, right?

Also, it seems Wengier has a GitHub account: https://github.com/Wengier. He has DOS related repositories, so chances are it's him. Maybe it would make sense to ping him so that he can comment here?

You can ping him anyway. He is the host of The New DOS Times where cjkdos is recommended, but I am not sure if he is the author.

HeavySnowJakarta commented 1 year ago

@Wengier You may be interested in this project. We want to find the author of cjkdos for permission to add it to FreeDOS for i18n support. As the China DOS Union website is down, it would be greatly appreciated if you could give us a hand.

致 Wengier 前辈,您也许对此项目感兴趣。我们希望寻找 cjkdos 的作者以期请求将其加入 FreeDOS。由于“中国DOS联盟”目前无法访问,如果您能给予帮助,我们不胜感激。

4Darmygeometry commented 1 year ago

CJKDOS,又名AW97,由爱文电脑公司(已倒闭)、四通新世纪信息公司(已改名新浪公司)、北京信息工程学院(已改名北京信息科技大学)、南京大学、上海交通大学联合研制,作者名为刘基.由于年代久远,作者已很难找到.

CJKDOS, also called AW97, is jointly developed by Aiwen Computer Co., Ltd. (closed down), Sitong New Century Information Co., Ltd. (renamed Sina), Beijing Institute of Information Engineering (renamed Beijing Information Science and Technology University), Nanjing University and Shanghai Jiaotong University, The name of the auther is Liu Ji. Due to its long history, the author is hard to find.

The programming language to program CJKDOS is Borland C++.

HeavySnowJakarta commented 1 year ago

CJKDOS,又名AW97,由爱文电脑公司(已倒闭)、四通新世纪信息公司(已改名新浪公司)、北京信息工程学院(已改名北京信息科技大学)、南京大学、上海交通大学联合研制,作者名为刘基.由于年代久远,作者已很难找到.

CJKDOS, also called AW97, is jointly developed by Aiwen Computer Co., Ltd. (closed down), Sitong New Century Information Co., Ltd. (renamed Sina), Beijing Institute of Information Engineering (renamed Beijing Information Science and Technology University), Nanjing University and Shanghai Jiaotong University, The name of the auther is Liu Ji. Due to its long history, the author is hard to find.

The programming language to program CJKDOS is Borland C++.

Thus, it's hard to include it. Although hope exists, it is not sure whether the source code can be found. About CCDOS, the very early CCDOS is open-source for any usage, maybe like Apache or even CC0 (at that time there wasn’t such a concept as “OSI licenses” in China and he just released his code to the public). At the very least, it's also useful to open source here for anyone to write an alternative.

4Darmygeometry commented 1 year ago

I know, thanks. --東雲なの

HeavySnowJakarta commented 1 year ago

As Wengier replied, DOSBox-X (under GPL 2.0) has better support for east-Asian languages, whose official site is https://dosbox-x.com, and the GitHub repository is https://github.com/joncampbell123/dosbox-x. It uses language files to define i18n support and has good support for displaying and inputting east-Asian languages in multiple native charsets, including GB2312, GBK, Big5-2003, ChinaSea, etc. The Unicode conversation is available to read Unicode files (but I think native Unicode support is better) and additional Chinese systems are allowed. For more information, see https://dosbox-x.com/wiki/Guide%3AEast-Asian-language-support-in-DOSBox%E2%80%90X.

HeavySnowJakarta commented 1 year ago

About DOSBox-X, it can natively support East Asian languages. As an emulator that depends on the host os, the code pages are stored in any charset the os supports, but the dos kernel it emulates is not in Unicode. To display different languages, chcp command is provided to change the charset being used, but the input method is provided by the host os. That is to say, east Asian language input methods have to be provided by FreeDOS itself.