Comments (2)
Ok, you're specifically referring to UTF8 correct?
If so, could you update the bug title to reflect that? I assume you're aware that there are already string conversions for existing char*, std::string etc.
from jni-bind.
So, I took a pass through your conversion code, and had a chance to think a bit on this myself.
I think your conversion may be simple a subset of the behaviour LocalString
already supports.
The former case is a function that takes in a std::string
and performs a conversion to UTF16
from UTF8
. I believe just using a regular ctor is equivalent?
The latter converts from a UTF16 string to a regular std::string, however, LocalString just directly asks for a UTF8
string, so you're probably just making your conversion explicit, or making an unnecessary one (I don't know what the JVM does internally).
That said, in C++20, UTF16
has its own view std::filesystem::path::u16string. Here, calling GetUtfString
could actually be efficiently represented. So, I think this should be revisited when C++20 support is added, but I think your conversion methods are already covered.
from jni-bind.
Related Issues (20)
- Fix MSVC compilation failures HOT 1
- jni_mh.h with jint as 32-bit long HOT 9
- Add `Self` syntax documentation
- Attempt to remove non-JNI local reference with GlobalObject HOT 13
- Getting compilation errors when using modules HOT 3
- Generate release header is freezing on macOS HOT 3
- Godbolt Sample
- Introductory Youtube video HOT 1
- Add cmake module file HOT 1
- Difficulty expressing a method call HOT 6
- Update Bazel to version 7.*
- Add Mac test runner HOT 2
- Add per trace logging
- Document `SetFallbackLoader` workaround for Android.
- `std::nullptr_t` should be an acceptable ctor for all `Scoped` types.
- Add enum class support
- Support Inheritance
- `Self` is broken when used in statics
- Against HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jni-bind.