On Sun, 2006-02-12 at 20:18 +0100, Vadim Zeitlin wrote:
> MR> For which cases do you need the encodings exactly in Mahogany?
> 
>  E.g. for viewing messages it must find an encoding available on the
> current system (i.e. such that there are fonts which may be used to display
> text in it) and compatible with the given one. It uses wxFontMapper for
> this and AFAIR it doesn't work at all under GTK2 because some methods it
> uses are just stubbed out.

In GTK+ you don't need to set a correct encoding to have it use a font
that has the glyphs in it. If a font is used that doesn't have them,
pango will simply look for the best font that does have the glyphs - and
if the system has one installed, it will find them.

So, given the ability to pass the proper UTF-8 string into the GTK2
control, all should be working.
The wxGTK_CONV and wxGTK_CONV_BACK wrappers _should_ take care of
converting it correctly to UTF-8 from wxConvLocal.

The macros are in non-unicode as follows:
#define wxGTK_CONV(s) wxConvUTF8.cWC2MB( wxConvLocal.cWX2WC(s) )
#define wxGTK_CONV_BACK(s) wxConvLocal.cWC2WX( (wxConvUTF8.cMB2WC( s ) ) )

The problem might be, that you can't easily tell it to convert from your
certain encoding (say, KOI-8) to UTF-8, regardless of what the current
locale is.

Is there any other reason to use wxFontMapper?
I might be misunderstanding the use of wxFontMapper here.
Of course, I'm not telling wxFontMapper shouldn't work - it should, but
maybe something can be done easilly until it does.

-- 
With regards,
Mart Raudsepp

Project manager of wxMUD
E-mail: [EMAIL PROTECTED]
http://wxmud.sourceforge.net/



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mahogany-Developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to