Skip to content

fix: pass media paths to FFmpeg as UTF-8 - #446

Merged
devopvoid merged 1 commit into
mainfrom
fix/media-path-utf8
Oct 25, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/media-path-utf8

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

MediaReader and MediaRecorder handed JNI's modified UTF-8 to FFmpeg, which writes characters beyond the Basic Multilingual Plane (emoji and the like) as surrogates, so such files could not be opened or were created under a mangled name.

Strings now cross the JNI boundary as UTF-16 and are encoded as UTF-8; messages back to Java are encoded as modified UTF-8. A source containing a null character is rejected instead of being cut short.

JNI's modified UTF-8 writes characters beyond the Basic Multilingual
Plane as surrogates, so FFmpeg could not open or create files with such
names. Strings now cross the JNI boundary as UTF-16 and are encoded as
UTF-8, and messages back to Java are encoded as modified UTF-8. A source
with a null character is rejected instead of being cut short.
@devopvoid
devopvoid merged commit 9a31b0d into main Oct 25, 2026
20 of 22 checks passed
@devopvoid
devopvoid deleted the fix/media-path-utf8 branch October 25, 2026 15:45
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.

1 participant