[extended ASCII] StringGetChar and CharToStr are not identical
Hello,
I am working on some functions such as base64_encode and base64_decode. https://www.mql5.com/en/code/8098
But I realize that StringGetChar and CharToStr do not give the same result with extended ASCII (ASCII code > 127 and code < 256)
Is this a bug?
Test Code:
Result:
This is still a bug, I am trying to overcome it.
If anyone has a good solution, I would love to hear.
This is still a bug, I am trying to overcome it.
If anyone has a good solution, I would love to hear.
There is no bug, mql4 and mql5 are using Unicode string. When you print an Unicode value, don't expect to get an ASCII code.
If your issue is about BASE64, you can use CryptEncode()/CryptDecode() functions.
Hello,
I am working on some functions such as base64_encode and base64_decode. https://www.mql5.com/en/code/8098
But I realize that StringGetChar and CharToStr do not give the same result with extended ASCII (ASCII code > 127 and code < 256)
Is this a bug?
Test Code:
Result: