[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [patch #3562] Add Unicode support to Xsharp when using
From: |
Marc Haisenko |
Subject: |
[Pnet-developers] [patch #3562] Add Unicode support to Xsharp when using Xft |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko) |
This mail is an automated notification from the patch tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[patch #3562] Full Item Snapshot:
URL: <http://savannah.gnu.org/patch/?func=detailitem&item_id=3562>
Project: DotGNU Portable.NET
Submitted by: Marc Haisenko
On: Wed 12/08/2004 at 14:37
Category: None
Priority: 4
Resolution: None
Privacy: Public
Assigned to: None
Originator Email:
Status: Open
Summary: Add Unicode support to Xsharp when using Xft
Original Submission: This patch adds Unicode support to Xsharp when using Xft.
The patch converts strings into wide char strings (32 bit characters) using
mbstowcs, which seems to be part of the C89 and UNIX98 / Single UNIX
Specifications and thus should be avaible on all Unices. A quick google says it
is also avaible on Mac OS X (being a BSD) and Windows / Visual Studio 6, so
this should be pretty portable.
Configure checks for mbstowcs, #ifdef's have been used to guard the use of
mbstowcs so the code works like it did before on system that don't have
mbstowcs.
The original version of this patch used mbsrtowcs but while adding the #ifdef
guards I found that supporting both mbsrtowcs and mbstowcs would result in very
ugly code (way too many #if's). I think maintainable code is more important
than the two or three cycles that mbsrtowcs could save. Of course I could add
support for both mbsrtowcs and mbstowcs if other developers say it IS worth the
three saved cycles ;-)
This patch has a problem, though: mbstowcs is dependent on the locale settings.
If the locale is set to C or POSIX you won't get Unicode characters as these
two locales just use the 7bit US-ASCII character space. All other locales work
on Linux because they all derive from the "i18n" locale in the glibc. I don't
know if mbstowcs does The Right Thing (tm) on non-glibc systems as well.
File Attachments
-------------------
-------------------------------------------------------
Date: Wed 12/08/2004 at 14:37 Name: Xsharp.Unicode.patch Size: 4KB By:
darkdust
http://savannah.gnu.org/patch/download.php?item_id=3562&item_file_id=3931
For detailed info, follow this link:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=3562>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Pnet-developers] [patch #3562] Add Unicode support to Xsharp when using Xft,
Marc Haisenko <=