forked from OpenShot/openshot-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving UTF-8 path detection and conversion (OpenShot#2525)
* Improving support for UTF-8 paths during the converstion from abs to rel (i.e. saving project) * Removing strict JSON parsing and pretty printing OSP project file JSON * Removing utf-8 parsing on read / write * Manually escape backslashes (for windows paths and certain utf-8 strings) * Experimental conversion from bytestring to unicode strings in Python (prior to any backslash replacing), and then re-encode the paths. This is to prevent breaking the JSON. * Preventing the tutorial from popping up momentarily even when no tutorials are visible * Adding debug info and more work on correctly parsing and replacing paths without breaking them * Replacing utf parsing when converting paths to absolute * Normalize path when searching for missing file paths (and combining folders and file names) * Replacing backslashes with forward slashes for saving relative paths (due to crashes in Windows) * Fixing invalid utf logic when converting to abs paths * Switching to re.sub for regex substitutions, instead of slower str.replace (for large projects with hundreds or thousands of matches)
- Loading branch information
Showing
4 changed files
with
94 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters