You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jotzet79 unicode is always tricky to deal with and it's entirely possible there's a bug in OSXPhotos. Here's what OSXPhotos does at the moment:
When comparing text, rendering templates, writing data to Photos (e.g. creating albums), etc., OSXPhotos always converts to NFC formatted unicode. This is consistent with what macOS does.
However, when creating filenames and directories, OSXPhotos will convert to NFD format if on macOS, otherwise NFC if on linux. This is consistent with how the default behavior of the two operating systems.
That means the album name in Photos may be different than the folder name on disk though visually they will be the same. Internally they would use 2 different unicode encodings.
I've considered in the past adding a unicode template that would convert text to a given encoding. For example:
{unicode.nfc:{folder_album}} or {folder_album|unicode.nfc}.
Internally this would take a fair bit of work because the template system normalizes everything. Another option is to specify the "internal" unicode format and the "external (on disk)" unicode format via options. This is much easier to implement as osxphotos already contains methods to globally adjust this in the code. For example:
@jotzet79 unicode is always tricky to deal with and it's entirely possible there's a bug in OSXPhotos. Here's what OSXPhotos does at the moment:
When comparing text, rendering templates, writing data to Photos (e.g. creating albums), etc., OSXPhotos always converts to NFC formatted unicode. This is consistent with what macOS does.
However, when creating filenames and directories, OSXPhotos will convert to NFD format if on macOS, otherwise NFC if on linux. This is consistent with how the default behavior of the two operating systems.
That means the album name in Photos may be different than the folder name on disk though visually they will be the same. Internally they would use 2 different unicode encodings.
I've considered in the past adding a unicode template that would convert text to a given encoding. For example:
{unicode.nfc:{folder_album}}
or{folder_album|unicode.nfc}
.Internally this would take a fair bit of work because the template system normalizes everything. Another option is to specify the "internal" unicode format and the "external (on disk)" unicode format via options. This is much easier to implement as osxphotos already contains methods to globally adjust this in the code. For example:
osxphotos export --directory {folder_album} --unicode-filesystem NFC --unicode-internal NFD
I'll open a new issue for this.
Originally posted by @RhetTbull in #410 (comment)
The text was updated successfully, but these errors were encountered: