Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix utf-8 character writing #277

Merged
merged 4 commits into from
Feb 28, 2025
Merged

Fix utf-8 character writing #277

merged 4 commits into from
Feb 28, 2025

Conversation

skjerns
Copy link
Collaborator

@skjerns skjerns commented Feb 27, 2025

There seems to be a problem with writing uft8 chars, see #275

The problem was that chinese utf chars are multi byte encoded, however, the C extension sanitized all byte chars that are below value 32 (control chars). for multi byte, that is actually valid printable unicode. Simply removing this fixes the issue.

for(i=0; ; i++) {
  if(list_annot->annotation[i] == 0) {
    break;
  }
  if(list_annot->annotation[i] < 32) {
    list_annot->annotation[i] = '.';
  }
}

fixes #275

@skjerns skjerns merged commit 275b4fd into master Feb 28, 2025
33 of 34 checks passed
@skjerns skjerns changed the title WIP: Fix utf-8 character writing Fix utf-8 character writing Feb 28, 2025
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.

function writeAnnotation, description can`t be chinese(utf_8)
1 participant