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(binding/java): decode Java’s modified UTF-8 format #3195

Merged
merged 3 commits into from
Sep 27, 2023
Merged

fix(binding/java): decode Java’s modified UTF-8 format #3195

merged 3 commits into from
Sep 27, 2023

Conversation

G-XD
Copy link
Contributor

@G-XD G-XD commented Sep 26, 2023

Fix: #3194

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Let's factor out this repeat conversion into jstring_to_string:

fn jstring_to_string(env: &mut JNIEnv, s: &JString) -> Result<String> {
    let res = unsafe { env.get_string_unchecked(&s)? };
    Ok(res.into())
}

I suspect we may have more thoughts on this conversion, so open to change.

@tisonkun tisonkun merged commit 9315df4 into apache:main Sep 27, 2023
42 checks passed
@tisonkun
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java binding will cause invalid utf-8 sequence error if passed path parameter contains emoji
3 participants