Skip to content

match decomposed/precomposed unicode strings with sub-auto=fuzzy #4016

Closed

Description

@ParadiseDS

mpv version and platform

macOS 10.12.2
mpv 0.23.0

Reproduction steps

  1. Set sub-auto=fuzzy in mpv.conf.

  2. rename a video with the filename[ぐ.mkv and rename the corresponding subtitle file with [ぐ.ass. Both files are in the same directory.

  3. open the [ぐ.mkv with terminal command mpv \[ぐ.mkv

Expected behavior

Since the sub-auto=fuzzy is set, subtitle file with filename same to the video file should be loaded automatically when the video is opened.

Actual behavior

mpv doesn't load the subtitle file automatically. ~~What is stranger, filename with single ぐ or single [ doesn't trigger the problem. The bug occurs with [ and ぐ both be present in the filename. ~~
Update
The ぐ character is to blame as far as I tested.

Update:
If mpv is defined as the default player and thus launched by double click the file in Finder, the subtitle file can be loaded normally. The bug only occurs under terminal launch.

Log file

http://sprunge.us/WVGI

Activity

  1. wiiaboo commented on Jan 10, 2017

    @wiiaboo
    Member

    Must be some macOS-only bug, works fine in Windows.

  2. ParadiseDS commented on Jan 11, 2017

    @ParadiseDS
    Author

    Must be some macOS-only bug, works fine in Windows.

    Do you try to open the video via terminal (maybe cmd in windows? I didn't try mpv in windows..)
    I just found the problem was only triggered via terminal launch. Opening the file in Finder is fine.

  3. Akemi commented on Jan 11, 2017

    @Akemi
    Member

    i can't reproduce this. it works via terminal and the bundle here. can you reproduce it with --no-config --sub-auto=fuzzy?

  4. ParadiseDS commented on Jan 11, 2017

    @ParadiseDS
    Author
  5. ParadiseDS commented on Jan 11, 2017

    @ParadiseDS
    Author

    So it is a normalization issue, where OSX not only uses non-standard normalization, but also is inconsistent about which form it uses.

    Likely a WONTFIX.

    Sorry to hear that.
    Is there any work around for this issue? As launching mpv via bundle just works while iTerm2.app and terminal.app fail, can the terminal applications behave as Finder do?

  6. Akemi commented on Jan 11, 2017

    @Akemi
    Member

    i tested with the same mpv version and set the same locale as you. i am also on the same macOS version, and it still works here. i wonder what else could be different on your system.

  7. ParadiseDS commented on Jan 11, 2017

    @ParadiseDS
    Author
  8. changed the title [-]mpv failed to load subtitle file with specific character pair in filename[/-] [+]mpv failed to load subtitle file with specific character in filename[/+] on Jan 11, 2017
  9. Akemi commented on Jan 11, 2017

    @Akemi
    Member

    tested with that too and still works. here a log. the only things i really noticed, when comparing the logs, is:

    1. your libass is build with harfbuzz, which shouldn't make a difference
    2. my mpv is build with uchardet, which might make the difference here

    maybe give it a try and build mpv with uchardet. if you can't, try this build. if you want to start it from the terminal, right click the bundle and click "Show package Contents", navigate to Contents > MacOS and drag an drop the "mpv" binary into your terminal. in the terminal there should be the path to the binary now and just test it with --no-config and your options again.

  10. wiiaboo commented on Jan 11, 2017

    @wiiaboo
    Member

    I don't think uchardet works on filenames, just on subtitle data. @wm4?

  11. 22 remaining items

  12. changed the title [-]mpv failed to load subtitle file with specific character in filename[/-] [+]match decomposed/precomposed unicode strings with sub-auto=fuzzy[/+] on Jan 20, 2017
  13. Akemi commented on Jan 20, 2017

    @Akemi
    Member

    i changed the title a bit since this is more like a feature request now.

  14. added 3 commits that reference this issue on Jan 25, 2017
    3e5b990
    f210822
    de5a3a9
  15. Akemi commented on Jan 25, 2017

    @Akemi
    Member

    #4067 another attempt to fix this. hopefully this time without any drawbacks.

  16. added a commit that references this issue on Jan 26, 2017
    66ac354
  17. ParadiseDS commented on Jan 26, 2017

    @ParadiseDS
    Author
  18. Akemi commented on Jan 29, 2017

    @Akemi
    Member

    just wondering, this worked for you as expected?

  19. ParadiseDS commented on Jan 30, 2017

    @ParadiseDS
    Author
  20. added a commit that references this issue on Feb 2, 2017
    b451a4a
  21. added a commit that references this issue on Feb 2, 2017
    8bbdece
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions