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
Recovering window title using TProcess sometimes gives incorrect value. #408
Comments
Per discussion in the thread the likely culprit is UTF-16 values inside of a Pascal string. The concerns farther down in #338 are relevant to this bug report - the best way to handle Unicode support on Windows is to use UTF-8 internally and then convert it to UTF-16 when using OS facilities. If there is any way to put this in a unit that would be ideal, but this is something that needs to be done every place where Windows text API is used. |
The forum post contains an outline for the code to convert between Unicode encodings. |
Per LCL documentation TProcess uses the system codepage on Windows, meaning it is UTF-16. The result needs to be converted to UTF-8 for display with I'm wary of using types with |
Window title + TProcess, something is very off here... The villavu thread you are referring to talks about See the original commit: 58faccf Finally, now that that's cleared up, from what I gather; the following 3 changes are needed:
Done, that's it, nothing more to it. |
Yeah I kind of wonder what I was thinking. If nobody commits the change I will see if I can make one that doesn't use |
See: https://villavu.com/forum/showthread.php?t=117585&p=1386995#post1386995
Some titles are complete, some are truncated at the first non-alphabetical, non-alphanumeric, or non-word character.
The text was updated successfully, but these errors were encountered: