Files
Windows-11-Clipboard-Histor…/src-tauri
freshCoder21313 ae7bdfe86a fix(clipboard): improve linux reliability (#229)
* fix(clipboard): improve linux reliability

- Implemented robust text and HTML setting using xclip and wl-copy
- Added fallback to arboard for better compatibility on Linux distros
- Updated package-lock.json with peer dependency metadata

* refactor(clipboard): remove unused variables

- Clean up unused variables to resolve compiler warnings
- Remove redundant system clipboard initialization in paste_item

* fix(clipboard): improve linux external tool handling

- Added target OS guards to prevent executing Linux-specific commands on other platforms
- Enhanced error reporting by capturing stderr when external tools like xclip or wl-copy fail
- Updated HTML clipboard logic to attempt setting both HTML and plain text formats sequentially"

* fix(linux): improve multi-format clipboard copy

- Ensure plain text is set robustly after HTML content on Wayland and X11
- Prevents potential race conditions or overwrites when using external tools

* fix(clipboard): explicitly set UTF-8 targets to prevent mojibake on browsers

Browsers strictly enforce X11/Wayland clipboard target MIME types and atoms.
When clipboard data is set with `text/plain`, browsers default to decoding
it as ISO-8859-1 or ASCII, which breaks special characters, icons, and emojis
such as kaomoji (e.g. they show as `ðð§(。â¥â¿â¥ï½¡)`).

This commit resolves the mojibake issue on Linux by:
- Explicitly appending `;charset=utf-8` to the target when using `wl-copy`.
- Explicitly using the `UTF8_STRING` atom instead of `text/plain` for `xclip` to conform with X11 conventions.
2026-04-18 15:45:47 -03:00
..
2026-01-01 01:32:29 -03:00
2026-01-01 01:32:29 -03:00
2026-01-29 02:42:55 -03:00
2025-12-11 01:58:08 -03:00
2026-03-08 10:18:35 -03:00
2026-03-08 10:18:35 -03:00