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

Support non UTF-8 strings #52

Closed
yvz5 opened this issue Aug 4, 2017 · 3 comments
Closed

Support non UTF-8 strings #52

yvz5 opened this issue Aug 4, 2017 · 3 comments

Comments

@yvz5
Copy link

yvz5 commented Aug 4, 2017

thread 'main' panicked at 'called Result::unwrap()on anErr value: Utf8Error { valid_up_to: 1, error_len: Some(1) }', src\libcore\result.rs:860

The database has german characters in it "üÜäÄöÖ".

this is how I try to get the data:
cursor.get_data::<String>(3)

is this a bug or should I use some other data type ?

@Koka
Copy link
Owner

Koka commented Aug 4, 2017

Looks like a bug. Could you please share additional details on RDBMS and ODBC driver used?

@yvz5
Copy link
Author

yvz5 commented Aug 4, 2017

I have SQL Anywhere 17 both 32-bit and 64-bit ODBC Drivers installed. When I try the same connection string and sql statement in c#, everything is fine.

@pacman82
Copy link
Contributor

pacman82 commented Aug 6, 2017

String is a UTF8 encoded string. The data returned does not seem to be UTF8 encoded. If we had support for Vec<u8> right now, I would suggest using that and do the encoding yourself. We could also think about retrieving String as wide characters.

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

No branches or pull requests

3 participants