I think what you need to do is convert utf8 to 8-bits, and switch the 
windows code page each time you encounter a character that cannot be 
drawn with the current one. This would be done by the text drawing code. 
It probably needs a big lookup table from unicode to code page.

This is useful but should be done without messing up the public api. 
There is no need to make all the testing functions anything other than 
local static functions in the same file that uses it. We don't need some 
new fltk method of identifying the platform, programmers already have 
hundreds of ways to do that!

Rafal wrote:
> Rafal wrote:
> 
> After research, currently the situation is following.
> 
> Unicode strings are not displayed in win98 (especiall older ones I guess, no
> libcows/MSLU).
> 
> Question:
> Can anyone PLEASE paste WinAPI code, that will display on dc (using
> CreateFontIndirectA and TextOutA) how to display string say "Łódź" on
> windows 98/95?
> This string does consist only of characters from one windows code page
> (typicall, windows-cp-1250).
> 
> My work:
> It seems the best way would be to use TextOutA, and as string pass there not
> UTF-8 data, but extended ascii (windows-cp-1250) data.  
> (and similar for other code pages).
> 
> I almost did that, but... from what I seen, the font on win98 did not
> contain all needed glyps in one code page... strange.
> 
> Well I will work a bit.
> 
> 
> Attaching a random WIP patch, it also contains
> * public detect OS function (not only win32)
> * has_unicode now publid (not only win32)
> * detail - show extra version info
> 
> I hope to fix that, but if anyone can contribute a working example...
> Surprisingly, even nowdays microsoft developers do not know easly how to do
> the above... Well, I guess win98 _is_ very old... 
> 
> 
> 
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to