- added some bug fixes to check if lng files are utf-8 or not and deal with it appropriately

This commit is contained in:
Mark Vejvoda
2011-06-08 07:18:06 +00:00
parent bf9702cdca
commit f65bfe8710
29 changed files with 3072 additions and 83 deletions

View File

@@ -27,11 +27,11 @@ namespace Shared{ namespace Util{
const int strSize = 256;
bool strToBool(const string &s){
if (s=="0" || s=="false"){
bool strToBool(const string &s) {
if(s=="0" || s=="false") {
return false;
}
if (s=="1" || s=="true"){
if(s=="1" || s=="true") {
return true;
}
throw runtime_error("Error converting string to bool, expected 0 or 1, found: [" + s + "]");