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

String types issue #3

Open
thetrik opened this issue Aug 22, 2018 · 3 comments
Open

String types issue #3

thetrik opened this issue Aug 22, 2018 · 3 comments

Comments

@thetrik
Copy link
Member

thetrik commented Aug 22, 2018

It should accept an UTF-8 string. It accepts an ANSI text right now and we can't control conversion.
Solution:
Change all the LPSTR parameters to void* or it's better to update all the functions with the BSTR parameters

@wqweto
Copy link
Member

wqweto commented Aug 22, 2018

I made some effort for params named utf8 + something to tag these As Long, the rest char * params are currently LPSTR which might be a problem.

UTF8<->BSTR will need some manual conversion helpers anyway. How do you plan to handle UTF-8 strings?

@thetrik
Copy link
Member Author

thetrik commented Aug 22, 2018

How do you plan to handle UTF-8 strings?

I plan to modify all the public functions that accepts the strings and insert the BSTR->UTF8 converter inside each procedure. In that case we'll need to change all the prototypes to BSTR/LPWSTR.

@wqweto
Copy link
Member

wqweto commented Aug 22, 2018

That IMO would be the most convenient approach. Basicly LPSTR params get the BSTR->ANSI treatment by the compiler and although invisible the string conversion overhead is still there.

Note that some strings are probably in/out params i.e. will need both BSTR->UTF-8 and UTF-8->BSTR on retval.

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

No branches or pull requests

2 participants