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

Fix don't show title in recent files list may not work because title have special chars. #1035

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lifegpc
Copy link

@lifegpc lifegpc commented Mar 31, 2021

fix this.

@ale5000-git
Copy link

ale5000-git commented Apr 1, 2021

Hi,
why not using CStringW directly for strings that are supposed to contain unicode chars like title and fileName?

@lifegpc
Copy link
Author

lifegpc commented Apr 1, 2021

They are same if _UNICODE is defined.

@ale5000-git
Copy link

ale5000-git commented Apr 1, 2021

Isn't possible instead of regex and all this code convert to std::u32string and use std::u32string::find?

@lifegpc
Copy link
Author

lifegpc commented Apr 1, 2021

This is not necessary. CStringW use UTF-16.

@ale5000-git
Copy link

Then about std::u16string::find?
I haven't tried but maybe it handle unicode characters correctly; special chars aren't really special chars, they are just unicode characters.

@lifegpc
Copy link
Author

lifegpc commented Apr 1, 2021

wstring is same with u16string on windows system. Special chars means unprintable chars and some chars can not used in file name.

@ale5000-git
Copy link

I see title and filename equal in MPC-HC.
Does this mean that the title in the sample file include some characters that when I view the title in MPC-HC they aren't displayed?

If yes, then there is an additional bug in ffmpeg or youtube-dl because these characters shouldn't be muxed in the file.

@clsid2
Copy link
Owner

clsid2 commented Apr 1, 2021

It already shows only filename here. What does this change?

@lifegpc
Copy link
Author

lifegpc commented Apr 1, 2021

When title include some chars which can not used in file name. (Such as /.) Some downloader such as youtube-dl will replace it to _.

@lifegpc
Copy link
Author

lifegpc commented Apr 1, 2021

When title include some chars which can not used in file name. (Such as /.) Some downloader such as youtube-dl will replace it to _.

The example file download with YouTube-DL.

@ale5000-git
Copy link

Now I get it, there is a unnoticeable slash in the middle of the title:
duplicate

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.

3 participants