|
I found another XmString thing to fix for WIDECHAR
support, which we use and are testing now.
In XmString.c, the function
XmStringGetNextSegment...
Before:
if (text) *text =
XtNewString(context->text);
}
After: { /* XXX May not be the safest way to determine that string is Unicode */ if
(strncasecmp(context->charset, "iso10646", 8) == 0)
{
int size =
(_ucstrlen(context->text) + 1) * 2;
void* ucstr = XtMalloc(size); memcpy(ucstr, context->text, size); *text = (char*)ucstr; } else { *text = XtNewString(context->text); }
} To do this "correctly" _XmStringGetNextSegment
would have to be modified to return something else telling us what the component
type of context->text is. However, I don't know if that function's
parameter list is set in stone or if it could be modified.
After this fix (plus the ones I submitted earlier),
XmString appears to correctly handle WIDECHAR text, at least for the cases where
we use it in our software.
-- Dave Williss
------ Meddle not in the affairs of dragons, for you are crunchy and taste good with catsup
|
- [Lesstif] Fixes to XmString.c Dave Williss
- RE: [Lesstif] Fixes to XmString.c danny . backx
- Dave Williss
