RomanT wrote:Это только мы с тобой понимаем, что это на самом деле кидалово, а для них это нормальный бизнес-продукт ...
Самое смешное, что в Сербии по идее тоже кириллица, но походу как их посетили америкосы, так они забыли свой язык ...
I assure you that we have not forgotten our language, nor have we forgotten Cyrillic alphabet.
What you all seem to forget is that non-Unicode programs stayed in use long after Unicode was adopted as a standard. The purpose of Unicode is to provide multilingual processing, but there is another way that predates Unicode by more than 15 years.
When ASCII was created by the Americans, it defined mapping of characters from 0 to 127 (7-bit coding scheme) which were most frequently used in English. One bit was left for the rest of the world so that other countries could implement their own writing systems through extensions called "Code Pages". Even DOS had this implemented. One of the popular code pages that covers Cyrillic alphabet for Russian, Serbian, Bulgarian and Macedonian is Windows-1251 (
http://en.wikipedia.org/wiki/Windows-1251).
In Windows, changing default system code page (system locale) can be done through Control Panel:
Code: Select all
1. Region and Language -> Administrative -> Language for non-Unicode programs -> Change system locale
2. Select Russian
3. Reboot PC
Now open Visual TFT, place some controls and edit their captions:
- VTFT_Cyrillic.png (77.95 KiB) Viewed 9376 times
You can also use Cyrillic script in your compiler's IDE:
- mC_Cyrillic.png (15.76 KiB) Viewed 9376 times
The only problem remaining is that Visual TFT, i.e. GLCDFontCreatorDLL.dll generates code for characters based on the Unicode character table with 255 as the max char code. Open up Windows Character Map utility and you will see that Cyrillic letters are way out of byte range (0-255). Luckily, there is a free tool called GLCD Font Creator that allows you to import system fonts and choose wider range of characters. Unfortunately, this range must be contiguous and you cannot remap characters to match different code pages.
With the help of
Microchip AN1182 which describes the font format used by Visual TFT, I created a simple application that does exactly that. It parses the code generated by GLCD Font Creator and generates the Windows-1251 compliant code. I didn't want to spend too much time on it so the code page is implemented partially (letters A-я or characters 192-255) which should be enough. The application practically uses a big font table (more than 1000 chars) generated by GLCD Font Creator (chars 32-1103), maps the Cyrillic letters in 192-255 range and recalculates offsets for the glyphs.
Here's the end result for the above example:
- Cyrillic.jpg (182.83 KiB) Viewed 9376 times