Index: src/PGResultRow.m ================================================================== --- src/PGResultRow.m +++ src/PGResultRow.m @@ -189,18 +189,23 @@ @end @implementation PGResultRowObjectEnumerator - (id)nextObject { + id object; + if (_pos >= _count) return nil; while (_pos < _count && PQgetisnull(_res, _row, _pos)) _pos++; if (_pos >= _count) return nil; - return convertType(_res, _pos, - [OFString stringWithUTF8String: PQgetvalue(_res, _row, _pos++)]); + object = convertType(_res, _pos, + [OFString stringWithUTF8String: PQgetvalue(_res, _row, _pos)]); + _pos++; + + return object; } @end Index: src/exceptions/PGException.m ================================================================== --- src/exceptions/PGException.m +++ src/exceptions/PGException.m @@ -12,11 +12,11 @@ @try { _connection = [connection retain]; _error = [[OFString alloc] initWithCString: PQerrorMessage([_connection PG_connection]) - encoding: [OFString nativeOSEncoding]]; + encoding: [OFSystemInfo native8BitEncoding]]; } @catch (id e) { [self release]; @throw e; }