I'm trying to break string's dependency on unicharutil and other i18n 
libraries like uconv. The problem I'm running into is that the string 
library (both new and obsolete) provides routines dealing with case, 
such as ToUpper(), ToLower() and CaseInsensitiveFindInReadable(). These 
routines require the use of the i18n libraries (specifically, 
nsICaseConversion) to do figure out what the upper-case of a particular 
unicode character is.

What I'd like to do is actually remove case-related unicode APIs from 
the string library, and provide them as helper routines that can be 
statically linked in as a seperate library for only those consumers 
which actually use these routines. The declarations of these routines 
would also move out to a seperate header file, like nsUnicharUtils.h. 
The static library effectively acts as glue to call related routines in 
nsICaseConversion, while retaining the ease-of-use of the current APIs. 
Only those consumers who actually need these routines would actually 
link against this library.

I've gone through the tree to do this work, and found about a dozen 
consumers of such routines for the new string APIs, though I haven't 
touched the old APIs.

Comments? See http://bugzilla.mozilla.org/show_bug.cgi?id=100214

Alec


Reply via email to