From the course: C Programming: Exploring Advanced Concepts and Practical Applications

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Setting the locale

Setting the locale

- [Instructor] In the early days of computing, it was a major ordeal to get computers to talk with each other. It's not an issue today, as common file formats and other standards exist, but differences still pop up, primarily with regards to location. For example, a price is written in the United States with a dollar sign. A comma separates thousands from hundreds, and a dot indicates the decimal portion. In many European countries, the euro sign is used. A dot separates thousands and hundreds, and a dot or comma is used for the decimal portion. These items, as well as other details, such as the character set the language uses, are collectively known as the locale. At the shell prompt, you can use the locale command to output details specific to your computer's configuration. The language shown here is C, which is using the UTF-8 character set. You might see another language, such as US English. C is the default for the POSIX configuration. Other details are also provided, giving the…

Contents