Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Added UTF-8 support to OMEdit


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9054 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 20, 2011
1 parent 512b9bd commit 996570c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions OMEdit/OMEditGUI/OMCProxy.cpp
Expand Up @@ -149,7 +149,7 @@ bool OMCProxy::startServer()
QString omcPath;
#ifdef WIN32
if (!omhome)
throw std::runtime_error(GUIMessages::getMessage(GUIMessages::OPEN_MODELICA_HOME_NOT_FOUND).toStdString());
throw std::runtime_error(GUIMessages::getMessage(GUIMessages::OPEN_MODELICA_HOME_NOT_FOUND).toLocal8Bit());
omcPath = QString( omhome ) + "/bin/omc.exe";
#else /* unix */
omcPath = (omhome ? QString(omhome)+"/bin/omc" : QString(CONFIG_DEFAULT_OPENMODELICAHOME) + "/bin/omc");
Expand Down Expand Up @@ -191,7 +191,7 @@ bool OMCProxy::startServer()
if (ticks > 20)
{
msg = "Unable to find " + Helper::applicationName + " server, Object reference file " + mObjectRefFile + " not created.";
throw std::runtime_error(msg.toStdString().c_str());
throw std::runtime_error(msg.toStdString());
}
}
// ORB initialization.
Expand All @@ -205,7 +205,7 @@ bool OMCProxy::startServer()
objectRefFile.readLine( buf, sizeof(buf) );
QString uri( (const char*)buf );

CORBA::Object_var obj = orb->string_to_object(uri.trimmed().toLatin1());
CORBA::Object_var obj = orb->string_to_object(uri.trimmed().toLocal8Bit());

mOMC = OmcCommunication::_narrow(obj);
mHasInitialized = true;
Expand Down Expand Up @@ -284,7 +284,7 @@ void OMCProxy::sendCommand(const QString expression)
}
else
{
mResult = mOMC->sendExpression(expression.toLatin1());
mResult = QString::fromLocal8Bit(mOMC->sendExpression(getExpression().toLocal8Bit()));
logOMCMessages(expression);
}
}
Expand All @@ -307,7 +307,7 @@ void OMCProxy::sendCommand(const QString expression)

void OMCProxy::sendCommand()
{
mResult = mOMC->sendExpression(getExpression().toLatin1());
mResult = QString::fromLocal8Bit(mOMC->sendExpression(getExpression().toLocal8Bit()));
}

void OMCProxy::setResult(QString value)
Expand Down

0 comments on commit 996570c

Please sign in to comment.