1

I'm issuing the command xdg-mime install nv-custom.xml - using this file:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
   <mime-type type="text/x-customtest">
     <comment></comment>
     <glob weight="60" pattern="*...someUnicodeHere"/>
   </mime-type>
</mime-info>

Is it possible to use unicode in the glob's pattern field?

I tried Ctrl + Shift + U followed by a code, which works fine, but then the file does not have any effect, whereas it works just fine with "regular" text.

HPPH
  • 35
  • 7
  • What bytes did Ctrl+Shift+U actually insert into to your file: was it the UTF-8 encoding of your code point, or some other encoding? – chepner Jun 16 '20 at 17:09
  • 1
    I am able to reproduce this issue. Specifying `pattern="*.文档"` followed by `xdg-mime query filetype myfile.文档` gives `text/plain`, whereas `pattern="*.asdf"` followed by `xdg-mime query filetype myfile.asdf` gives `text/x-customtest` as expected. I'm using `LANG=en_US.UTF-8` – that other guy Jun 16 '20 at 17:31
  • 1
    @thatotherguy interestingly, if you don't use `*` in the pattern, unicode works just fine (as in, you can name a file exactly what's specified in the pattern, and then it will work)... – HPPH Jun 16 '20 at 17:44

0 Answers0