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:
True Broker Comment: "A quantidade da ordem é maior"
Actual Python Result: OrderSendResult.comment returns an empty string.
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?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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!