--- a/secureswitools/swisistools/source/interpretsislib/expressionevaluator.cpp Thu Jul 15 18:47:04 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/expressionevaluator.cpp Thu Aug 19 10:02:49 2010 +0300
@@ -108,9 +108,9 @@
{
iExpressionDepth=0;
std::string error = "SIS File expression too complex\n";
- std::string x;
+ std::string x = wstring2string(iExpEnv.GetPackageName());
//
- throw InvalidSis(Ucs2ToUtf8(iExpEnv.GetPackageName(),x), error, SIS_NOT_SUPPORTED);
+ throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
}
switch (aExpression.Operator())
@@ -248,9 +248,9 @@
{
iExpressionDepth=0;
std::string error = "SIS File contains user options\n";
- std::string x;
+ std::string x = wstring2string(iExpEnv.GetPackageName());
//
- throw InvalidSis(Ucs2ToUtf8(iExpEnv.GetPackageName(),x), error, SIS_NOT_SUPPORTED);
+ throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
}
case CSISExpression::EPrimTypeNumber:
@@ -261,9 +261,9 @@
{
iExpressionDepth=0;
std::string error = "SIS File contains unknown expression\n";
- std::string x;
+ std::string x = wstring2string(iExpEnv.GetPackageName());
//
- throw InvalidSis(Ucs2ToUtf8(iExpEnv.GetPackageName(),x), error, SIS_NOT_SUPPORTED);
+ throw InvalidSis(x, error, SIS_NOT_SUPPORTED);
}
}
@@ -316,8 +316,7 @@
}
// Require for invalid file exception (also helps with debugging)
- std::string narrowFileName;
- narrowFileName = Ucs2ToUtf8( fileName, narrowFileName );
+ std::string narrowFileName = wstring2string( fileName );
// Now continue with file, assuming we've fixed up the path or then
// have enough characters to process
@@ -345,8 +344,7 @@
ConvertToLocalPath( fileName, iCDrive );
// For debugging
- narrowFileName = Ucs2ToUtf8( fileName, narrowFileName );
-
+ narrowFileName = wstring2string( fileName );
fileExists = FileExists( fileName );
break;
}
@@ -363,7 +361,7 @@
std::ostringstream stream;
stream << "\tIF EXISTS(\'" << narrowFileName << "\') => " << fileExists;
std::string msg = stream.str();
- std::wstring finalMessage = Utf8ToUcs2( msg );
+ std::wstring finalMessage = string2wstring( msg );
LINFO( finalMessage );
}
//
@@ -428,7 +426,7 @@
std::ostringstream stream;
stream << "Input language " << result << " is not supported by SIS file. Using first language " <<firstLanguage;
std::string msg = stream.str();
- std::wstring finalMessage = Utf8ToUcs2( msg );
+ std::wstring finalMessage = string2wstring( msg );
LWARN( finalMessage );
}
result = firstLanguage;
@@ -439,7 +437,7 @@
std::ostringstream stream;
stream << "\tIF " << attributeName << " ... where [" << attributeName << " = " << result << "]";
std::string msg = stream.str();
- std::wstring finalMessage = Utf8ToUcs2( msg );
+ std::wstring finalMessage = string2wstring( msg );
LINFO( finalMessage );
}
}
@@ -453,8 +451,7 @@
}
else
{
- std::string packageName;
- packageName = Ucs2ToUtf8( GetPackageName(), packageName );
+ std::string packageName = wstring2string( GetPackageName() );
//
std::string error = "SIS File contains HAL attributes\n";
throw InvalidSis( packageName, error, SIS_NOT_SUPPORTED );