abe471e
--- src/csvparser.cpp~	2012-09-21 14:19:12.000000000 -0500
abe471e
+++ src/csvparser.cpp	2012-09-21 14:32:10.667705093 -0500
abe471e
@@ -76,7 +76,7 @@
abe471e
 
abe471e
 void CsvParser::advance(Char ch)
abe471e
 {
abe471e
-    if (ch == L'\n')
abe471e
+    if ( (int) ch == (int) L'\n')
abe471e
         ++_lineNo;
abe471e
 
abe471e
     switch (_state)
abe471e
@@ -82,7 +82,7 @@
abe471e
     switch (_state)
abe471e
     {
abe471e
         case state_detectDelim:
abe471e
-            if (isalnum(ch) || ch == L'_' || ch == L' ')
abe471e
+            if (isalnum(ch) || (int) ch == (int) L'_' || (int) ch == (int) ' ')
abe471e
             {
abe471e
                 _titles.back() += ch.narrow();
abe471e
             }
abe471e
@@ -86,13 +86,13 @@
abe471e
             {
abe471e
                 _titles.back() += ch.narrow();
abe471e
             }
abe471e
-            else if (ch == L'\n' || ch == L'\r')
abe471e
+            else if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 log_debug("title=\"" << _titles.back() << '"');
abe471e
                 _noColumns = 1;
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
             }
abe471e
-            else if (ch == L'\'' || ch == L'"')
abe471e
+            else if ( (int) ch == (int) L'\'' || (int) ch == (int) L'"')
abe471e
             {
abe471e
                 _quote = ch;
abe471e
                 _state = state_detectDelim_q;
abe471e
@@ -119,17 +119,17 @@
abe471e
             break;
abe471e
 
abe471e
         case state_detectDelim_postq:
abe471e
-            if (isalnum(ch) || ch == L'_' || ch == L'\'' || ch == L'"' || ch == L' ')
abe471e
+            if (isalnum(ch) || (int) ch == (int) L'_' || (int) ch == (int) L'\'' || (int) ch == (int) L'"' || (int) ch == (int) L' ')
abe471e
             {
abe471e
                 std::ostringstream msg;
abe471e
                 msg << "invalid character '" << ch.narrow() << "' within csv title of column " << _titles.size();
abe471e
                 SerializationError::doThrow(msg.str());
abe471e
             }
abe471e
-            else if (ch == L'\n' || ch == L'\r')
abe471e
+            else if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 log_debug("title=\"" << _titles.back() << '"');
abe471e
                 _noColumns = 1;
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
             }
abe471e
             else
abe471e
             {
abe471e
@@ -142,10 +142,10 @@
abe471e
             break;
abe471e
 
abe471e
         case state_title:
abe471e
-            if (ch == L'\n' || ch == L'\r')
abe471e
+            if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 log_debug("title=\"" << _titles.back() << '"');
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
                 _noColumns = _titles.size();
abe471e
             }
abe471e
             else if (ch == _delimiter)
abe471e
@@ -153,7 +153,7 @@
abe471e
                 log_debug("title=\"" << _titles.back() << '"');
abe471e
                 _titles.push_back(std::string());
abe471e
             }
abe471e
-            else if (ch == L'\'' || ch == L'\"')
abe471e
+            else if ( (int) ch == (int) L'\'' || (int) ch == (int) L'\"')
abe471e
             {
abe471e
                 if (_titles.back().empty())
abe471e
                 {
abe471e
@@ -185,10 +185,10 @@
abe471e
             break;
abe471e
 
abe471e
         case state_qtitlep:
abe471e
-            if (ch == L'\n' || ch == L'\r')
abe471e
+            if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 log_debug("title=\"" << _titles.back() << '"');
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
                 _noColumns = _titles.size();
abe471e
             }
abe471e
             else if (ch == _delimiter)
abe471e
@@ -207,7 +207,7 @@
abe471e
 
abe471e
         case state_cr:
abe471e
             _state = state_rowstart;
abe471e
-            if (ch == L'\n')
abe471e
+            if ( (int) ch == (int) L'\n')
abe471e
             {
abe471e
                 break;
abe471e
             }
abe471e
@@ -228,14 +228,14 @@
abe471e
                 _column < _titles.size() ? _titles[_column] : std::string(),
abe471e
                 std::string(), SerializationInfo::Value);
abe471e
 
abe471e
-            if (ch == L'\n' || ch == L'\r')
abe471e
+            if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 _deserializer->leaveMember();
abe471e
                 checkNoColumns(_column, _noColumns, _lineNo);
abe471e
                 _deserializer->leaveMember();
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
             }
abe471e
-            else if (ch == L'"' || ch == L'\'')
abe471e
+            else if ((int) ch == L'"' || (int) ch == L'\'')
abe471e
             {
abe471e
                 _quote = ch;
abe471e
                 _state = state_qdata;
abe471e
@@ -253,7 +253,7 @@
abe471e
             break;
abe471e
 
abe471e
         case state_data0:
abe471e
-            if (ch == L'"' || ch == L'\'')
abe471e
+            if ( (int) ch == (int) L'"' || (int) ch == (int) L'\'')
abe471e
             {
abe471e
                 _quote = ch;
abe471e
                 _state = state_qdata;
abe471e
@@ -261,7 +261,7 @@
abe471e
             }
abe471e
 
abe471e
         case state_data:
abe471e
-            if (ch == L'\n' || ch == L'\r')
abe471e
+            if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 log_debug("value \"" << _value << '"');
abe471e
                 _deserializer->setValue(_value);
abe471e
@@ -269,7 +269,7 @@
abe471e
                 checkNoColumns(_column, _noColumns, _lineNo);
abe471e
                 _deserializer->leaveMember();  // leave data item
abe471e
                 _deserializer->leaveMember();  // leave row
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
             }
abe471e
             else if (ch == _delimiter)
abe471e
             {
abe471e
@@ -307,11 +307,11 @@
abe471e
             break;
abe471e
 
abe471e
         case state_qdata_end:
abe471e
-            if (ch == L'\n' || ch == L'\r')
abe471e
+            if ( (int) ch == (int) L'\n' || (int) ch == (int) L'\r')
abe471e
             {
abe471e
                 checkNoColumns(_column, _noColumns, _lineNo);
abe471e
                 _deserializer->leaveMember();  // leave row
abe471e
-                _state = (ch == L'\r' ? state_cr : state_rowstart);
abe471e
+                _state = ( (int) ch == (int) L'\r' ? state_cr : state_rowstart);
abe471e
             }
abe471e
             else if (ch == _delimiter)
abe471e
             {
abe471e
--- src/jsonformatter.cpp~	2012-05-03 11:06:16.000000000 -0500
abe471e
+++ src/jsonformatter.cpp	2012-09-21 16:10:58.726176999 -0500
abe471e
@@ -323,25 +323,25 @@
abe471e
 {
abe471e
     for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
abe471e
     {
abe471e
-        if (*it == '"')
abe471e
+        if ( (int) *it == (int) '"')
abe471e
             *_ts << L'\\'
abe471e
                 << L'\"';
abe471e
-        else if (*it == '\\')
abe471e
+        else if ( (int) *it == (int) '\\')
abe471e
             *_ts << L'\\'
abe471e
                 << L'\\';
abe471e
-        else if (*it == '\b')
abe471e
+        else if ( (int) *it == (int) '\b')
abe471e
             *_ts << L'\\'
abe471e
                 << L'b';
abe471e
-        else if (*it == '\f')
abe471e
+        else if ( (int) *it == (int) '\f')
abe471e
             *_ts << L'\\'
abe471e
                 << L'f';
abe471e
-        else if (*it == '\n')
abe471e
+        else if ( (int) *it == (int) '\n')
abe471e
             *_ts << L'\\'
abe471e
                 << L'n';
abe471e
-        else if (*it == '\r')
abe471e
+        else if ( (int) *it == (int) '\r')
abe471e
             *_ts << L'\\'
abe471e
                 << L'r';
abe471e
-        else if (*it == '\t')
abe471e
+        else if ( (int) *it == (int) '\t')
abe471e
             *_ts << L'\\'
abe471e
                 << L't';
abe471e
         else if (static_cast<unsigned char>(*it) >= 0x80 || static_cast<unsigned char>(*it) < 0x20)
abe471e
@@ -364,25 +364,25 @@
abe471e
 {
abe471e
     for (cxxtools::String::const_iterator it = str.begin(); it != str.end(); ++it)
abe471e
     {
abe471e
-        if (*it == L'"')
abe471e
+        if ( (int) *it == (int) L'"')
abe471e
             *_ts << L'\\'
abe471e
                 << L'\"';
abe471e
-        else if (*it == L'\\')
abe471e
+        else if ( (int) *it == (int) L'\\')
abe471e
             *_ts << L'\\'
abe471e
                 << L'\\';
abe471e
-        else if (*it == L'\b')
abe471e
+        else if ( (int) *it == (int) L'\b')
abe471e
             *_ts << L'\\'
abe471e
                 << L'b';
abe471e
-        else if (*it == L'\f')
abe471e
+        else if ( (int) *it == (int) L'\f')
abe471e
             *_ts << L'\\'
abe471e
                 << L'f';
abe471e
-        else if (*it == L'\n')
abe471e
+        else if ( (int) *it == (int) L'\n')
abe471e
             *_ts << L'\\'
abe471e
                 << L'n';
abe471e
-        else if (*it == L'\r')
abe471e
+        else if ( (int) *it == (int) L'\r')
abe471e
             *_ts << L'\\'
abe471e
                 << L'r';
abe471e
-        else if (*it == L'\t')
abe471e
+        else if ( (int) *it == (int) L'\t')
abe471e
             *_ts << L'\\'
abe471e
                 << L't';
abe471e
         else if (it->value() >= 0x80 || it->value() < 0x20)
abe471e
--- src/xml/entityresolver.cpp~	2012-05-03 11:06:15.000000000 -0500
abe471e
+++ src/xml/entityresolver.cpp	2012-09-21 17:51:22.973780927 -0500
abe471e
@@ -563,19 +563,19 @@
abe471e
 
abe471e
 String EntityResolver::resolveEntity(const String& entity) const
abe471e
 {
abe471e
-    if (!entity.empty() && entity[0] == L'#')
abe471e
+    if (!entity.empty() && (int) entity[0] == (int) L'#')
abe471e
     {
abe471e
         int code = 0;
abe471e
-        if (entity.size() > 2 && entity[1] == L'x')
abe471e
+        if (entity.size() > 2 && (int) entity[1] == (int) L'x')
abe471e
         {
abe471e
             // hex notation: ꯍ
abe471e
             for (String::const_iterator it = entity.begin() + 2; it != entity.end(); ++it)
abe471e
             {
abe471e
-                if (*it >= L'0' && *it <= L'9')
abe471e
+                if ( (int) *it >= (int) L'0' && (int) *it <= (int) L'9')
abe471e
                     code = code * 16 + (it->value() - L'0');
abe471e
-                else if (*it >= L'A' && *it <= L'F')
abe471e
+                else if ( (int) *it >= (int) L'A' && (int) *it <= (int) L'F')
abe471e
                     code = code * 16 + (it->value() - L'A' + 10);
abe471e
-                else if (*it >= L'a' && *it <= L'f')
abe471e
+                else if ( (int) *it >= (int) L'a' && (int) *it <= (int) L'f')
abe471e
                     code = code * 16 + (it->value() - L'a' + 10);
abe471e
                 else
abe471e
                     throw std::runtime_error(std::string("invalid entity ") + entity.narrow());
abe471e
@@ -586,7 +586,7 @@
abe471e
             // dec notation: ✏
abe471e
             for (String::const_iterator it = entity.begin() + 1; it != entity.end(); ++it)
abe471e
             {
abe471e
-                if (*it >= L'0' && *it <= L'9')
abe471e
+                if ( (int) *it >= (int) L'0' && (int) *it <= (int) L'9')
abe471e
                     code = code * 10 + (it->value() - '0');
abe471e
                 else
abe471e
                     throw std::runtime_error(std::string("invalid entity ") + entity.narrow());
abe471e
--- src/bin/formatter.cpp~	2012-05-03 11:35:06.000000000 -0500
abe471e
+++ src/bin/formatter.cpp	2012-09-21 21:23:28.796827789 -0500
abe471e
@@ -218,7 +218,7 @@
abe471e
 
abe471e
     if (type == "int")
abe471e
     {
abe471e
-        if (value.size() > 0 && (value[0] == L'-' || value[0] == L'+'))
abe471e
+        if (value.size() > 0 && ( (int) value[0] == (int) L'-' || (int) value[0] == (int) L'+'))
abe471e
         {
abe471e
             int64_t v = convert<int64_t>(value);
abe471e
             printInt(*_out, v, name);