Skip to content
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

fixes issue #34 - put on hold #53

Closed
wants to merge 2 commits into from
Closed

fixes issue #34 - put on hold #53

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 24, 2018

No description provided.

@ghost
Copy link
Author

ghost commented Apr 26, 2018

While it solves the creation of scripts issue it generates display issues of menu items.
On hold until solved.

@ghost ghost changed the title fixes issue #34 fixes issue #34 - put on hold Apr 26, 2018
@chcg
Copy link
Collaborator

chcg commented Apr 26, 2018

@ClaudiaFrank Do you mean the issue from #20:

Could you add Unicode support to the menu?
Hebrew file-names are displayed as gibberish.

?


OPENFILENAMEA ofn;
memset(&ofn, 0, sizeof(OPENFILENAMEA));
OPENFILENAMEW ofn;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be possible to use the version OPENFILENAME, GetSaveFileName, CreateFile without the W extension as we are building with Unicode and in this case it is anyhow mapped to the W versions, see e.g. docu of https://msdn.microsoft.com/en-us/library/windows/desktop/ms646839(v=vs.85).aspx
at the end of the page in requirements

@ghost
Copy link
Author

ghost commented Apr 26, 2018

Kind of yes, it is a little bit strange, it does work under subdirectories and in main menu when using
Configuration tool (see script ÜberÄÖß.py)

but running it by clicking the item under subdirectory corrupts the
Run Previous Script menu item

and clicking the ÜberÄÖß.py under main menu does NOT corrupt the Run Previous Script menuitem
BUT does not execute the script at all.

@chcg
Copy link
Collaborator

chcg commented Apr 26, 2018

Seems to be caused by:
void MenuManager::updatePreviousScript(const char *filename)

Need to be tested with e.g.
גלילת שורות.py
this is still not fixed.

@ghost
Copy link
Author

ghost commented Apr 26, 2018

I guess/assume I understood what the problem is.
PythonScript does, internally, char to wchar/wchar to char conversion by using utf-8.
I assume this is related to being pythons "native" encoding and consoles output encoding.
Now, windows uses, afaik, ucs-2 and acp internally - so an additional WcharMbcsConverter
like let's say acp2wchar and/or wchar2acp should do the trick (at least I hope so)

I will follow up on this and see if this is really the case.

@ghost
Copy link
Author

ghost commented Apr 28, 2018

This is still not perfect, even so menu issues should have been solved another issue raised
You cannot use console.writeError function together with python byte strings

Left, the white background = current situation (without unicode path support)
Right, black background = the new situation

grafik

In case that one wants to use the extended chars to be displayed as "error text" it is needed
to use unicode strings. I haven't found a suitable way to get rid of this.
Any ideas are very much appreciated.

@chcg
Copy link
Collaborator

chcg commented May 24, 2018

See PR #60, so this one could be closed, as discussed offline

@chcg chcg closed this May 24, 2018
@ghost ghost deleted the Issue_43_unicode branch May 27, 2018 15:30
vinsworldcom pushed a commit to vinsworldcom/PythonScript that referenced this pull request Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant