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)

x86
Other
defect

Tracking

()

RESOLVED FIXED

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
Status: NEW → ASSIGNED
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.
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.
Assignee: ftang → rickg
Status: ASSIGNED → NEW
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.
Whiteboard: code exist in patch form. Wait for RickG to check in.
I forgot to mention the patch to the test code is in http://warp/u/ftang/tmp/testcrtdiff.txt
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I check in the code. Mark this buf fixed.
QA Contact: teruko → cathleen
Cathleen, can you verify this?
You need to log in before you can comment on or make changes to this bug.