Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"stream did not contain valid UTF-8" #157

Open
bobblkabb opened this issue Jul 16, 2024 · 5 comments
Open

"stream did not contain valid UTF-8" #157

bobblkabb opened this issue Jul 16, 2024 · 5 comments

Comments

@bobblkabb
Copy link

Hi,

getting an error message when I do:
cliphist list | kickoff --from-stdin --stdout

How can I fix this?

Running latest 0.74 on openSUSE Tumbleweed (hyprland).

@j0ru
Copy link
Owner

j0ru commented Jul 16, 2024

Hi,
could you send me the output of the cliphist command as a file? You can generate it like this:

cliphist list > cliphist-output.txt

Check the file for secrets before you send it, as password might have been in your history!
I'm not absolutely sure if copy and paste could swallow potentially invalid characters, hence the stdout to file.

@bobblkabb
Copy link
Author

Don't know what happened but now it works.

@bobblkabb
Copy link
Author

Happens again. I can narrow it down to the last copy line.
cliphist-output.txt

Didn't copy complete text. It stops an the word "VW-Händler" which shows up as VW-HÃ
The Text was written and copied from scite editor. I can paste it into terminal and any text field.

@bobblkabb bobblkabb reopened this Aug 29, 2024
@j0ru
Copy link
Owner

j0ru commented Aug 31, 2024

Hey, thanks for supplying the additional info! Unfortunately I'm currently in the middle of moving countries, but I'll review it as soon as I have a stable network connection and a minute to think about it ;)

@j0ru
Copy link
Owner

j0ru commented Oct 13, 2024

Hm, the file you posted actually does not contain valid UTF-8.

00000000: 3338 3531 0947 7574 656e 2054 6167 2c20  3851.Guten Tag, 
00000010: 7365 6974 206b 7572 7a65 6d20 6265 7369  seit kurzem besi
00000020: 747a 6520 6963 6820 6569 6e65 6e20 5657  tze ich einen VW
00000030: 2c20 6465 6e20 6963 6820 6765 6272 6175  , den ich gebrau
00000040: 6368 7420 6265 696d 2056 572d 48c3       cht beim VW-H.

It ends on c3, which starts with 110 in binary. According to the UTF-8 standard, this indicates that another byte is needed to complete the character, but your file ends there. The next byte would have to be A4 to correctly display an ä

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants