Closed
Bug 12428
Opened 26 years ago
Closed 26 years ago
[feature] need API to convert nsString to UTF8 strings
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
RESOLVED
FIXED
M11
People
(Reporter: cathleennscp, Assigned: rickg)
References
()
Details
(Whiteboard: code exist in patch form. Wait for RickG to check in.)
Blocks: 9589
Summary: [feature] need APIs to convert nsString to UTF8 strings → [feature] need API to convert nsString to UTF8 strings
![]() |
||
Updated•26 years ago
|
Status: NEW → ASSIGNED
![]() |
||
Updated•26 years ago
|
Target Milestone: M11
Dan : I am not sure what you really need. Does the following API fulfill your
need ?
char* nsString::ToNewUTFCString()
Assuming it does the similar thing as ToNewCString but return UTF-8 in char*
instead.
Comment 1•26 years ago
|
||
Sure, that would work. I'd prefer the name ToNewUTF8String() though.
It should just be a simple assumption that nsString is Unicode and not call in
the charset conversion libraries. Duplicate the conversion so it loads and runs
fast. Should be a relatively trivial converter anyway.
![]() |
||
Updated•26 years ago
|
![]() |
||
Comment 2•26 years ago
|
||
OK I have make that function for nsString . Since I have problem to create patch with my communicator 4.5, I put it under
http://warp/u/ftang/tmp/nsstring2diff.txt
I also put a patch to patch mozilla/xpcom/tests/TestCRT.cpp and include 3 test cases from the RFC
Rick, please pick up the patch and check in nsString2.{h,cpp} and TestCRT.cpp
Reassign this to RickG since rick own nsString2.{h,cpp}
Rick, This is a blocker for dveditz so please check in ASAP (by M11 please). Thanks.
dan: I think you can apply tha patch to your local tree before RickG check in.
Let me know if you still need my help. Thanks.
![]() |
||
Updated•26 years ago
|
Whiteboard: code exist in patch form. Wait for RickG to check in.
![]() |
||
Comment 3•26 years ago
|
||
I forgot to mention the patch to the test code is in
http://warp/u/ftang/tmp/testcrtdiff.txt
![]() |
||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
![]() |
||
Comment 4•26 years ago
|
||
I check in the code. Mark this buf fixed.
You need to log in
before you can comment on or make changes to this bug.
Description
•