-
Notifications
You must be signed in to change notification settings - Fork 137
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
Prepared statement does not support unicode values #1813
Comments
Thanks for raising this, problem here is connected to usage of the JSON.stringify while going from JS object to a representation more closely related to C++, that is basically In particular we use Solution here might involve re-implementing JSON.stringify / providing a custom replacer to it, not really looking forward to, but I don't see many great way out. |
I fixed this in #1823. There will still a problem open: going through the native JS-api means strings are treated as JavaScript Strings (and not as Uint8Array, that closely match char* C++ semantics), as such some normalisations are performed, and for example I am not 100% happy with the fix, but it's hard to say what is the intended semantic (and a solid implementation) for it. This is a more general problem, shared with Python and node.js bindings. Escaping the backslash with another Note that going through SQL (eg. the duckdb-wasm shell) this is working as intended. I am inclined to consider this as solved. |
I will close the issue for now, but feel free to comment / reopen if this is not satisfactory. |
Thanks heaps for a quick fix 👍 |
What happens?
Prepared insert statement does not support passing values with unicode characters defined using
\u
. Anything after such character is escaped.To Reproduce
Please see an example in Codesandbox.
Browser/Environment:
Any
Device:
Any
DuckDB-Wasm Version:
1.28.1-dev248.0
DuckDB-Wasm Deployment:
N/A
Full Name:
Katarina Anton
Affiliation:
individual
The text was updated successfully, but these errors were encountered: