git-svn-id: svn://db.shs.com.ru/pip@218 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -285,6 +285,7 @@ const char * PIString::dataAscii() const {
|
|||||||
|
|
||||||
|
|
||||||
PIByteArray PIString::toUTF8() const {
|
PIByteArray PIString::toUTF8() const {
|
||||||
|
if (isEmpty()) return data_.resized(0);
|
||||||
buildData(
|
buildData(
|
||||||
#ifdef PIP_ICU
|
#ifdef PIP_ICU
|
||||||
"UTF-8"
|
"UTF-8"
|
||||||
@@ -295,6 +296,7 @@ PIByteArray PIString::toUTF8() const {
|
|||||||
|
|
||||||
|
|
||||||
PIByteArray PIString::toCharset(const char * c) const {
|
PIByteArray PIString::toCharset(const char * c) const {
|
||||||
|
if (isEmpty()) return data_.resized(0);
|
||||||
buildData(
|
buildData(
|
||||||
#ifdef PIP_ICU
|
#ifdef PIP_ICU
|
||||||
c
|
c
|
||||||
|
|||||||
@@ -693,6 +693,7 @@ PIString PIConfig::parseLine(PIString v) {
|
|||||||
|
|
||||||
|
|
||||||
void PIConfig::parse() {
|
void PIConfig::parse() {
|
||||||
|
//piCout << "[PIConfig] charset" << PIFile::defaultCharset();
|
||||||
PIString src, str, tab, comm, all, name, type, prefix, tprefix;
|
PIString src, str, tab, comm, all, name, type, prefix, tprefix;
|
||||||
PIStringList tree;
|
PIStringList tree;
|
||||||
Entry * entry, * te, * ce;
|
Entry * entry, * te, * ce;
|
||||||
@@ -719,6 +720,7 @@ void PIConfig::parse() {
|
|||||||
tab = str.left(str.find(str.trimmed().left(1)));
|
tab = str.left(str.find(str.trimmed().left(1)));
|
||||||
str.trim();
|
str.trim();
|
||||||
//cout << endl << str << endl << endl;
|
//cout << endl << str << endl << endl;
|
||||||
|
// piCout << "[PIConfig] str" << str.size() << str << str.toUTF8();
|
||||||
all = str;
|
all = str;
|
||||||
ind = str.find('=');
|
ind = str.find('=');
|
||||||
if ((ind > 0) && (str[0] != '#')) {
|
if ((ind > 0) && (str[0] != '#')) {
|
||||||
@@ -778,6 +780,8 @@ void PIConfig::parse() {
|
|||||||
ce->_value = str.right(str.length() - ind - 1).trimmed();
|
ce->_value = str.right(str.length() - ind - 1).trimmed();
|
||||||
ce->_type = type;
|
ce->_type = type;
|
||||||
ce->_comment = comm;
|
ce->_comment = comm;
|
||||||
|
//piCout << "[PIConfig] comm" << comm.size() << comm << comm.toUTF8();
|
||||||
|
//piCout << "[PIConfig] type" << type.size() << type << type.toUTF8();
|
||||||
ce->_line = lines;
|
ce->_line = lines;
|
||||||
ce->_all = all;
|
ce->_all = all;
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
|
|||||||
Reference in New Issue
Block a user