From: Badi K. S. <ba...@ya...> - 2004-12-15 09:39:43
|
Mark Davis wrote: >Use 2 international currency symbols. See also >http://www.unicode.org/reports/tr35/#Number_Format_Patterns > >Mar > Thanks Mark. But it doesn't seem to work. When u say 2 international currency symobls you mean something like setCurrency("$$"); ? UErrorCode success = U_ZERO_ERROR; NumberFormat* currfmt = NumberFormat::createCurrencyInstance(loc,success); char* setcurr = "$$"; UChar u_currsym[6]; u_charsToUChars(setcurr,u_currsym,6); currfmt->setCurrency(u_currsym,success); currfmt->format(val,str); I get this: $$4.13 -- Badi >k > >----- Original Message ----- >From: "Badi Kumar S." <ba...@ya...> >To: <icu...@os...> >Sent: Monday, December 13, 2004 22:28 >Subject: Currency formatting > > > > >>Hi all, >> >>I want to know how to get the "intl currency symbol" instead of the >>"currency symbol" as part of the format? I am doing this: >> >> Locale loc("en_US"); >> UErrorCode success = U_ZERO_ERROR; >> UnicodeString str; >> NumberFormat* currfmt = >>NumberFormat::createCurrencyInstance(loc,success); >> currfmt->format( doubleVal, ustr ); >> >> >>The format call above will give me something like "$4.23" . What should >>I do to get "USD4.23" ? >>Doing >> >> currfmt->setCurrency("USD"); >> >>does not help either. >> >>Thanks much in advance . >>-- >>Badi >> >>_______________________________________________ >>icu...@os... - icu4c-support mailing list >>To Un/Subscribe: >> >> >> >http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu4c-support > > > > > > > |