Bug Report: OrderSendResult Structure Missing comment Field Content in Python API When Non-UTF-8 Characters Are Present

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
Hi all,
I couldn't find a dedicated bug-reporting channel, so I'm posting here. I'd appreciate any confirmation from the community on this issue, and ideally, someone could escalate it to the development team if confirmed as a bug.
When using the Python API’s order_send() function in MT5, the OrderSendResult structure returned includes a comment field intended to capture the broker’s comment on the operation. However, if the broker's comment contains non-UTF-8 characters, the comment field remains empty in the Python API response, even though the comment displays correctly in the MT5 Terminal.
Steps to Reproduce
Execute a request using order_send() from the Python API, ensuring that the operation generates a comment with non-UTF-8 characters (e.g., by attempting to sell a symbol not present in your wallet).
Check the comment field in the OrderSendResult object returned by order_send() .
Expected Behavior
The comment field in the OrderSendResult should contain the broker's comment, including any non-UTF-8 characters, as displayed in the MT5 Terminal’s Journal tab.
Actual Behavior
The comment field in Python returns an empty string if the broker's comment includes non-UTF-8 characters. The comment, however, is visible in the MT5 Terminal.
Example
Here’s an example when attempting to sell a symbol not in the wallet:
Additional Context
This issue disrupts applications that rely on broker comments for diagnostics or logging, as key information is inaccessible when non-UTF-8 characters are involved.
Request
Can anyone verify if they experience the same behavior? If so, is there any workaround to access the broker's comment in its intended form via the Python API?
Thank you!