TestUser
TestUser

Reputation: 967

What is the relation between standard C++ functions and locale?

What is the relation between following standard C++ functions and locale

std::fopen, std::fstream::open 

Till now whenever i used these standard functions , i never thought anything about locale so why should i ever be bothered about locale?

While reading through stackoverflow i came across this

Everything usually works fine on Linux as everyone uses UTF-8 based locales so all user input and arguments passed to main functions will be UTF-8 encoded. But you might still need to switch current locales to UTF-8 variants explicitly as by default C++ program starts using default "C" locale.*

What is the above paragraph trying to say exactly? What is wrong in windows and OK in linux as per above paragraph?

Can anyone please explain in simple words preferably with a example?

Upvotes: 1

Views: 152

Answers (0)

Related Questions