Skip to content

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