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:
@@ -116,18 +116,18 @@ StyledEditView::GetStyledText(BPositionIO * stream)
|
|||||||
int32 state = 0;
|
int32 state = 0;
|
||||||
int32 bytesRead;
|
int32 bytesRead;
|
||||||
while ((bytesRead = stream->ReadAt(location,inBuffer,256)) > 0) {
|
while ((bytesRead = stream->ReadAt(location,inBuffer,256)) > 0) {
|
||||||
location += bytesRead;
|
|
||||||
char * inPtr = inBuffer;
|
char * inPtr = inBuffer;
|
||||||
char textBuffer[256];
|
char textBuffer[256];
|
||||||
int32 textLength = 256;
|
int32 textLength = 256;
|
||||||
int32 bytesConverted = bytesRead;
|
int32 bytes = bytesRead;
|
||||||
while (textLength > 0) {
|
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);
|
InsertText(textBuffer,textLength,textOffset);
|
||||||
textOffset += textLength;
|
textOffset += textLength;
|
||||||
inPtr += bytesConverted;
|
inPtr += bytes;
|
||||||
bytesRead -= bytesConverted;
|
location += bytes;
|
||||||
bytesConverted = bytesRead;
|
bytesRead -= bytes;
|
||||||
|
bytes = bytesRead;
|
||||||
if (textLength > 0) {
|
if (textLength > 0) {
|
||||||
textLength = 256;
|
textLength = 256;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user