Skip to content

Commit

Permalink
plugin: use UTF-8 for communication with sclang
Browse files Browse the repository at this point in the history
  • Loading branch information
jleben committed Apr 21, 2012
1 parent 50093fe commit ff9b040
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ScatePlugin.cpp
Expand Up @@ -40,8 +40,7 @@ void SCProcess::onReadyRead()
{
QByteArray bytes = readAll();
if( bytes.isEmpty() ) return;
QString text( bytes );
emit scSays( text );
emit scSays( QString::fromUtf8(bytes) );
}

K_PLUGIN_FACTORY_DEFINITION(ScatePluginFactory, registerPlugin<ScatePlugin>();)
Expand Down Expand Up @@ -239,7 +238,7 @@ void ScatePlugin::eval( const QString& cmd, bool silent )
}

QString str = cmd + ( silent ? "\x1b" : "\x0c" );
scProcess->write( str.toAscii() );
scProcess->write( str.toUtf8() );
}

void ScatePlugin::restartLang()
Expand Down

0 comments on commit ff9b040

Please sign in to comment.