format nuking, but working input conversion

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3868 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty
2003-07-06 09:11:27 +00:00
parent ebf4610ff0
commit 08db2111e1
+6 -6
View File
@@ -116,18 +116,18 @@ StyledEditView::GetStyledText(BPositionIO * stream)
int32 state = 0;
int32 bytesRead;
while ((bytesRead = stream->ReadAt(location,inBuffer,256)) > 0) {
location += bytesRead;
char * inPtr = inBuffer;
char textBuffer[256];
int32 textLength = 256;
int32 bytesConverted = bytesRead;
int32 bytes = bytesRead;
while (textLength > 0) {
convert_to_utf8(id,inPtr,&bytesConverted,textBuffer,&textLength,&state);
convert_to_utf8(id,inPtr,&bytes,textBuffer,&textLength,&state);
InsertText(textBuffer,textLength,textOffset);
textOffset += textLength;
inPtr += bytesConverted;
bytesRead -= bytesConverted;
bytesConverted = bytesRead;
inPtr += bytes;
location += bytes;
bytesRead -= bytes;
bytes = bytesRead;
if (textLength > 0) {
textLength = 256;
}