git-svn-id: svn://db.shs.com.ru/pip@208 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user