Fix accented characters within SVG symbol

This commit is contained in:
WandererFan
2016-11-01 20:02:15 -04:00
parent 195ea429e6
commit c8f380516a
4 changed files with 27 additions and 7 deletions
+18
View File
@@ -32,6 +32,7 @@
# include <QString>
# include <QStringList>
# include <QRegExp>
#include <QChar>
#include <BRep_Tool.hxx>
@@ -227,4 +228,21 @@ const char* DrawUtil::printBool(bool b)
{
return (b ? "True" : "False");
}
QString DrawUtil::qbaToDebug(const QByteArray & line)
{
QString s;
uchar c;
for ( int i=0 ; i < line.size() ; i++ ){
c = line[i];
if ( c >= 0x20 and c <= 126 ) {
s.append(QChar::fromLatin1(c));
} else {
s.append(QString::fromUtf8("<%1>").arg(c, 2, 16, QChar::fromLatin1('0')));
}
}
return s;
}
//==================================