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

File path encoding issue in GfxProcessor::readBitmap on Windows #1271

Open
zenden2k opened this issue Nov 17, 2018 · 0 comments
Open

File path encoding issue in GfxProcessor::readBitmap on Windows #1271

zenden2k opened this issue Nov 17, 2018 · 0 comments

Comments

@zenden2k
Copy link

zenden2k commented Nov 17, 2018

I created a custom GFX processor class derived from MegaGfxProcessor.
MEGA SDK documentation doesn't mention this but const char* path parameter in function MegaGfxProcessor::readBitmap contains a pointer to UTF-16 encoded string (which is odd) on Windows.
I cannot use this string as wide-char string because it is not null-terminated in UTF-16 sense (
it should contain two zero bytes at the end), so I cannot determine it's length.

bool MyGfxProcessor::readBitmap(const char* path) {
    CString widePath = reinterpret_cast<const wchar_t*>(path);

clipboard

@zenden2k zenden2k changed the title File path Encoding issue in GfxProcessor::readBitmap on Windows File path encoding issue in GfxProcessor::readBitmap on Windows Nov 17, 2018
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

1 participant