With a browser, how do I know which decimal separator the operating system uses?

Here is a simple JavaScript function that will return this information. Tested in Firefox, IE6, and IE7. I had to close and restart my browser in between every change to the setting under Control Panel / Regional and Language Options / Regional Options / Customize. However, it picked up not only the comma and period, … Read more

What is a good definition for language code and locale codes?

There are several systems for locale identifiers. Many of them are similar at the first glance, but not when you go deeper: Some examples (Serbian-Serbia with Latin Script, Japanese-Japan with radical sorting): UTS-35, ICU, Mac OS X, Flash: sr-Latn-RS, ja-JP@collation=radical Newer UTS-35, BCP 47 extension U: sr-Latn-RS, ja-JP-u-co-unihan Win 2000, XP: 0x81a, 0x10411 Vista, Win … Read more

How to get current locale of my environment?

From man 3 setlocale (New maxim: “When in doubt, read the entire manpage.”): If locale is “”, each part of the locale that should be modified is set according to the environment variables. So, we can read the environment variables by calling setlocale at the beginning of the program, as follows: #include <iostream> #include <locale.h> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)