-
Notifications
You must be signed in to change notification settings - Fork 120
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
Bugs in handling non-ASCII characters in clipboard over restarts #357
Comments
It looks like this is an issue upstream. If a fix isn't trivial to implement, it might be a good idea to switch this file and others which don't hold information usually edited by users to JSON while a fix is being worked on. |
Thanks, good find. I am not sure what would be more work. Changing to unicode at https://github.com/synkarius/caster/blob/bc5b2b8bd4a2495c910a4beb4260d50847f922a9/caster/lib/navigation.py#L100 seems to eliminate hex literals, but I am not certain about the whole issue |
I'll have to investigate further. I should've paid more attention to the clipboard changes in Dragonfly. It used to all be Unicode and just work. |
I don't know, I think with Json it worked. The upstream issue mention was spot on, because the string |
@Versatilus @comodoro
|
@Versatilus @LexiconCode A little peek on them:
|
Thank you for taking a closer look. How about for now, we utilize tomlkit as it seems to be a more advanced implementation?
Then for non-user facing files such as clipboard will use json until/if toml parsing libraries become a bit more mature. |
So it turns out I did not use Unicode literals, the tests in tomlkit are quite extensive and include Unicode without problems. So tomlkit seems to be OK everywhere. |
@comodoro |
@LexiconCode This is really best solved upstream, I will post a patch there, in case of non-reaction there are options of Versatilus' going back to json, monkey patching or adapting tomlkit. |
Sounds like a plan. |
Let me know when you have a patch upstream and I'll comment supporting your implementation. |
OK so it was just a preliminary shot, however it fails one of the tests and is still without reaction: uiri/toml#244. I have noticed as well that it can encode strings into TOML that the decoder is unable to decode, do not know if the decoder would have to be rewritten as well. All in all I think it is not worth the trouble as JSON was perfectly fine. |
This was solved/cuircumvented by #582 |
If I select "závorka", do "stoosh three", restart Dragon and do "spark three", I get
zxe1vorka
. It should be encoded asz\xe1vorka
. Probably affects characters 128-255. Confirmed by @mrob95Certain saved clipboard items give
A clipboard file is pasted here: https://pastebin.com/jGeV5jvE
The text was updated successfully, but these errors were encountered: