🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7881

Re: Obtaining the Currency Symbol

#7881
From: Bob Gonder
Date: Fri, 10 Dec 2004 23:46
30 lines
1591 bytes
Thomas Maeder [TeamB] wrote:

>#include <locale>
>#include <iostream>
>#include <ostream>
>
>void dump_currency_symbol(char const *locname)
>{
>  try
>  {
>    typedef std::moneypunct<char> moneyp_type;

std::cout<<locname<<std::use_facet<moneyp_type>(std::locale(locname)).curr_symbol()<<'\n';
>  }
>  catch (std::exception const &e)
>  {
>    std::cerr << e.what() << '\n';
>  }
>}
BOOL CALLBACK EnumLocalesProc( LPTSTR lpLocaleString )
{
	dump_currency_symbol(lpLocaleString);
	return TRUE;
}	

>int main()
>{
	dump_currency_symbol("");
	EnumSystemLocales( EnumLocalesProc );
>}
Technical Details
Message-ID: <20dkr0los4gnkm95m6ovgq1l1m69hgp5gd@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41b9992f$1@newsgroups.borland.com> <m2hdmtu7gh.fsf@madbox2.local>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5c552075733153e4
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Obtaining the Currency Symbol
Date: Fri, 10 Dec 2004 15:46:56 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <20dkr0los4gnkm95m6ovgq1l1m69hgp5gd@4ax.com>
References: <41b9992f$1@newsgroups.borland.com> <m2hdmtu7gh.fsf@madbox2.local>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.36.79
X-Trace: newsgroups.borland.com 1102722413 67.77.36.79 (10 Dec 2004 15:46:53 -0800)
Lines: 31
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail