I’m not sure where to submit this bug, so I’m starting from here.
If I open a file from nautilus with a # in its name (e.g. /path/to/recording#1.mp4) in a GLib/Gtk based application (e.g. daikhan), it fails with the error No such file /path/to/recording.
From my debugging sessions, I have found that nautilus does not escape the filename before constructing a uri for dbus activation. So, the GApplication gets uri file:/path/to/recording#1.mp4 to construct a GFile. To construct a GFile out of a uri, at some point, g_filename_from_uri () is called, and it strips out everything after a # or ?, as those are special characters in a URI (Universal Resource Identifier), which provide additional parameters but indicate the end of the actual path for the resource. So, what we get in the open function override is a GFile with path /path/to/recording instead of the full path /path/to/recording#1.mp4.
NOTE: This issue only occurs with the combination of Nautilus and DBus-activated GLib-based applications. In other words, I can open the same file from Nautilus in VLC, or from Dolphin in Daikhan just fine, but not from Nautilus in Daikhan.