-
Notifications
You must be signed in to change notification settings - Fork 579
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
how to change string encoding charset #293
Comments
…to change character encoding (issue bytedeco/javacpp#293)
Oops, sorry about that. I've added a |
thx. i've see the push to master
was i should change the version to which ?.snapshot and additionally.. |
See the version here: For the other way around, we can use: data().capacity(size()).getString("UTF-8") |
The changes have now been included with version 1.5. Please let me know if you encounter any other issues and thanks for reporting! |
for history reason..i can not change the global setting to change
file.encoding=UTF8
maybe i will cause some problem unpredictably..
but now i need to load a .pb file and input is a string tensor..but my app's file encoding default was
US-ASCII
print bySystem.out.println(Charset.defaultCharset())
i want to know whether exist api for change the charset encoding in small scope or not?
tensorflow.Tensor mockInput = new tensorflow.Tensor(tensorflow.DT_STRING, new TensorShape(new long[]{1}));
mockInput.createStringArray().put("香蕉 苹果 西瓜");
such as :
mockInput.createStringArray().put("香蕉 苹果 西瓜","UTF-8");
?i have try this but not worked.. :(
mockInput.tensor_data().putString("香蕉 苹果 西瓜","UTF-8");
The text was updated successfully, but these errors were encountered: