You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/08/16 21:04:05 UTC
DO NOT REPLY [Bug 11776] New: -
MacOSUnicodeConvertor::upperCase doesn't work correctly
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11776>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11776
MacOSUnicodeConvertor::upperCase doesn't work correctly
Summary: MacOSUnicodeConvertor::upperCase doesn't work correctly
Product: Xerces-C++
Version: 2.0.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: Normal
Priority: Other
Component: Utilities
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: bheatwole@artlogic.com
I believe the following code should fix this. Note, this code implements the
TODO previously marked in the code.
void MacOSUnicodeConverter::upperCase(XMLCh* const toUpperCase) const
{
// ��� TODO: Support CFString for this conversion
// And here it is...
// Convert the string to upper case use a CoreFoundation string as
// an intermediate step.
UniChar* p = (UniChar*)toUpperCase;
int length = XMLString::stringLen(p);
CFMutableStringRef cfString =
::CFStringCreateMutableWithExternalCharactersNoCopy(NULL, p, length,
0, NULL);
::CFStringUppercase(cfString, NULL);
::CFStringGetCharacters(cfString, ::CFRangeMake(0, length), p);
::CFRelease(cfString);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org