Sunday, May 10, 2009

gsoc2009unicode

Jordi Mas has organized his code so that you could build both ANSI and Unicode builds. Mostly, this uses ugly macros like TCHAR and macro'd functions. I will use wchar_t and the "W" version of the Win32 APIs, since I am going to build only a Unicode only build.

In src/af/util/win/, there are bForceAnsi flags in a number of functions that need to go; in src/wp/ap/win/ap_Win32App.cpp, there are a number of fromXtoY functions that need to be investigated (e.g., AP_Win32App::s_fromUTF8ToWinLocale).
Those fromXtoY functions are used in a number of dialogs.
Also I have to convert *A functions to *W ones. I thought of starting with the editing area and it is said that gui might be the tricker part.

It is also suggested to get rid of the xapencoding manager.

Recent Bug Reports regarding win32 + unicode:

UTF-16 and UCS-2
Microsoft uses UTF-16 little-endian as its standard for Unicode encoding

For Unicode (“Wide”) characters:
typedef unsigned short WCHAR; // 16 bit character
typedef WCHAR *LPWSTR; //pointer to 16 bit string

Abiword's internals are utf-8 and ucs-4. but the win32 parts should use utf-16, and then translate that into utf-8 or ucs-4, asp appropriate.
Internally the text engine uses UCS4.

Jordi Mas' unicode/ANSI build using tchar.h and tchar, and in mine (Unicode only build)
Unicode WCHAR and string functions.

Dialogs. menus. and toolbars to be ported first.

My project proposal can be found here.
List of all the projects and students along with their mentors can be found here.

Summer of Codes additional requirement: debug output.

No comments:

Post a Comment

You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.