Skip to content

Fix UTF-8 encoding in writeResult for multi-byte characters (#176)#177

Merged
andreaTP merged 1 commit into
StyraOSS:mainfrom
andreaTP:issue-176
May 14, 2026
Merged

Fix UTF-8 encoding in writeResult for multi-byte characters (#176)#177
andreaTP merged 1 commit into
StyraOSS:mainfrom
andreaTP:issue-176

Conversation

@andreaTP
Copy link
Copy Markdown
Collaborator

writeResult used String.length() (Java char count) for malloc and opaJsonParse, which undercounts for multi-byte UTF-8 characters like em-dash (U+2014). Encode to UTF-8 bytes first and use byte length.

fixes #176

…#176)

writeResult used String.length() (Java char count) for malloc and
opaJsonParse, which undercounts for multi-byte UTF-8 characters like
em-dash (U+2014). Encode to UTF-8 bytes first and use byte length.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@andreaTP andreaTP merged commit aa797f8 into StyraOSS:main May 14, 2026
5 checks passed
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.

Em-dash character (—, U+2014) not supported in policy strings

1 participant