git-svn-id: svn://db.shs.com.ru/pip@208 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2016-07-24 19:34:37 +00:00
parent 314c4a1a9b
commit 8befd35fd6
4 changed files with 23 additions and 9 deletions

View File

@@ -180,7 +180,7 @@ bool PIFile::closeDevice() {
PIString PIFile::readLine() {
PIString str;
PIByteArray str;
if (!opened_) return str;
int cc;
while (!isEnd()) {
@@ -188,8 +188,12 @@ PIString PIFile::readLine() {
if (char(cc) == '\n' || cc == EOF) break;
str.push_back(char(cc));
}
str.push_back('\0');
if (defaultCharset()) {
return PIString::fromCodepage((const char *)str.data(), defaultCharset());
}
//cout << "readline: " << str << endl;
return str;
return PIString(str);
}