Boost logo

Boost :

Subject: [boost] [lexical_cast] locale dependent result? (was: [lexical_cast] locale dependent result?)
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2011-03-02 07:00:47


No response on the boost.user list so I'm trying here in case the devs
know:

Is the result of lexical_cast<std::string> locale-dependent? One of my
contributors has submitted a fix for a problem he says is caused by
lexical_cast adding commas to a port number, e.g.: 65535 becomes "65,535".

I'm unable to reproduce this but it may be something specific to his
locale.

If this is the case, what would be the correct way to get a canonical,
locale-independent string from an integer?

Thanks.

Alex

-- 
Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk