Skip to content

Copying text from STDIN does not work if the text starts with MM #266

@jzjsuper

Description

@jzjsuper

Issue and Steps to reproduce

$ echo -n MM | wl-copy
$ echo -n MMm | wl-copy

It's expected that MM / MMm will be copied to clipboard, but actually nothing will be copied to clipboard.

Causes

I think this is caused by xdg-mime misidentifying the file type when a text file starts with MM.

$ echo -n MM > text
$ xdg-mime query filetype text
image/x-3ds

Versions

OS: Arch Linux x86_64

$ wl-copy -v
wl-clipboard 2.2.1
Copyright (C) 2018-2023 Sergey Bugaev
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ xdg-mime --version
xdg-mime 1.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    not our bugThe issue is in some other piece of software involved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions