[Bug 1890716] Re: misidentifies .html file as Perl script when it contains JavaScript "use strict"

2020-09-25 Thread Alex A. D.
@Kai Kasurinen >probably fixed on shared-mime-info 2.0: >https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/18bb7cfc6c43d710ecf60339b5dd9bd19c297cdf Yeah, well. It's if they only used the same database. -- You received this bug notification because you are a member of Ubuntu Bugs,

[Bug 1890716] Re: misidentifies .html file as Perl script when it contains JavaScript "use strict"

2020-09-25 Thread Alex A. D.
If you wrap string in the proper tags you will get the same result, but with different offset (28 chars): tee "index.html" < `printf "x"%.0s {1..228}` use strict eol # -> text/html -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1890716] Re: misidentifies .html file as Perl script when it contains JavaScript "use strict"

2020-09-25 Thread Alex A. D.
#INTRO After digging up for a while I've found where the issue comes from for both `.html` and `.py` (bug #1857824) files. #SHORT The culprit responsible for misidentification resides in `.xml` database which specifies how to match mime-type against input data. It can be found here [2]. #LONG

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-25 Thread Alex A. D.
Please, checkout my last comment on the related bug #1890716 here: https://bugs.launchpad.net/ubuntu/+source/shared-mime- info/+bug/1890716/comments/15 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1890716] Re: misidentifies .html file as Perl script when it contains JavaScript "use strict"

2020-09-24 Thread Alex A. D.
With the same setup I have the `mimetype` to output `text/html` for `index.html`. It seems it workds correctly. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1890716 Title: misidentifies .html file

[Bug 1890716] Re: misidentifies .html file as Perl script when it contains JavaScript "use strict"

2020-09-22 Thread Alex A. D.
** Also affects: kde-cli-tools (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1890716 Title: misidentifies .html file as Perl script when it

[Bug 1890716] Re: kmimetypefinder5 *.html reports wrong type

2020-09-22 Thread Alex A. D.
New bug reopened with complete and correct explanation: https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1896682 ** Changed in: shared-mime-info (Ubuntu) Status: Incomplete => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is

[Bug 1890716] Re: kmimetypefinder5 *.html reports wrong type

2020-09-22 Thread Alex A. D.
I've reported a new bug providing a complete and correct description: https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1896682 This one can be safely closed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1896682] [NEW] kmimetypefinder5 *.html reports wrong type

2020-09-22 Thread Alex A. D.
Public bug reported: # Test case: Run the following to reproude the issue in bash/shell/zsh: > $ tee "index.html" < use strict eol > $ xdg-mime query filetype index.html # => `application/x-perl`- WRONG type > $ kmimetypefinder5 index.html # => `application/x-perl` # Environment:

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-22 Thread Alex A. D.
Wow. I'm experiencing the same problem. I run the following test case: $ tee index.py http://www.w3.org/1999/xhtml;> Example title Example body """ print('Hello, world!') eol $ kmimetypefinder5 index.py # =>

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-22 Thread Alex A. D.
After running that commands I got the following output: $ ... Running kmimetypefinder5 "/home/alex/Desktop/index.html" application/x-perl It seems like that kmimetypefinder5 is major culprit here. I've found another unrelated bugreport here which was reported about a year ago:

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-22 Thread Alex A. D.
Is this still relevant? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1857824 Title: kmimetypefinder5 misidentifies mimetype of python files containing certain strings To manage notifications

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-09-21 Thread Alex A. D.
I just have tried a fresh new user. The output is identical. See attached screenshot. ** Attachment added: "xdg-mime query wrong result" https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716/+attachment/5413048/+files/Screenshot_20200921_232318.png -- You received this bug

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-12 Thread Alex A. D.
Hi Sebastien. Thaks your for your reply. I suggest you to do the following to see that even if file is starting with proper tags it is recognized as `application/x-perl`: $ tee "index.html" < use strict eol $ xdg-mime query filetype index.html # -> application/x-perl - wrong type Why did you

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-12 Thread Alex A. D.
why did you tag the report* Bump. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1890716 Title: xdg-mime query filetype index.html reports wrong type To manage notifications about this bug go to:

[Bug 1889477] Re: xdg-open on Kubuntu 20.04 reports 'Could not connect to localhost: Connection refused' if localhost service not already up

2020-08-06 Thread Alex A. D.
I'm using the same versions. Opening http:... links works fine for me. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1889477 Title: xdg-open on Kubuntu 20.04 reports 'Could not connect to

[Bug 1890716] Re: xdg-mime query filetype index.html reports wrong type

2020-08-06 Thread Alex A. D.
** Tags added: html xdg-mime xdg-open ** Tags added: 20.04 kde kubuntu perl -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1890716 Title: xdg-mime query filetype index.html reports wrong type To

[Bug 1890716] [NEW] xdg-mime query filetype index.html reports wrong type

2020-08-06 Thread Alex A. D.
Public bug reported: For .html files `xdg-mime` reports wrong type. The culprit is the `"use strict"` phrase which is used in JavaScript. It should not mistake .html files for anything else except of text/html ! STEPS TO REPRODUCE: Run the following step by step in any folder: 1. $ echo "\"use