MarkJoy:
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.
Tom Sasson:
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.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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: