Skip to content

Fix file truncation when writing with ICU#548

Merged
lhecker merged 1 commit into
mainfrom
dev/lhecker/545-fix-write-file-truncation
Jun 30, 2025
Merged

Fix file truncation when writing with ICU#548
lhecker merged 1 commit into
mainfrom
dev/lhecker/545-fix-write-file-truncation

Conversation

@lhecker

@lhecker lhecker commented Jun 30, 2025

Copy link
Copy Markdown
Member

Closes #545

Comment thread src/buffer/mod.rs

loop {
let chunk = self.read_forward(offset);
if chunk.is_empty() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't understand. the chunk was empty.

does buf contain the result of converting the prior chunk?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convert function flushes the output when the input chunk is empty.

@lhecker
lhecker merged commit c34bdb0 into main Jun 30, 2025
3 checks passed
@lhecker
lhecker deleted the dev/lhecker/545-fix-write-file-truncation branch June 30, 2025 21:41
Lou32Verbose pushed a commit to Lou32Verbose/edit that referenced this pull request Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Truncated last data block when transcode utf8 to utf16

2 participants