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

Malformed output when using bottom command with inline automatic encoder #2

Open
kotx opened this issue Jun 26, 2021 · 4 comments
Open
Labels
bug Something isn't working

Comments

@kotx
Copy link

kotx commented Jun 26, 2021

.bottom test produces πŸ’–πŸ’–βœ¨πŸ₯Ί,πŸ’–πŸ’–,πŸ’–πŸ’–βœ¨πŸ₯ΊπŸ’–πŸ’–βœ¨πŸ₯Ί,
but using https://bottom-software-foundation.github.io/bottom-web/ to decode, the input is said to be malformed. Using https://bottom-software-foundation.github.io/bottom-web/ to encode test produces πŸ’–πŸ’–βœ¨πŸ₯Ί,πŸ‘‰πŸ‘ˆπŸ’–πŸ’–,πŸ‘‰πŸ‘ˆπŸ’–πŸ’–βœ¨πŸ₯ΊπŸ‘‰πŸ‘ˆπŸ’–πŸ’–βœ¨πŸ₯Ί,πŸ‘‰πŸ‘ˆ
which is different.

@romdotdog
Copy link

The byte separators (πŸ‘‰πŸ‘ˆ) are gone. In my time using this plugin, (I now use my fork) I haven't encountered this issue. Is it any multi-byte text that you encounter this issue with?

aaa should yield πŸ’–βœ¨βœ¨βœ¨βœ¨πŸ₯Ί,,πŸ‘‰πŸ‘ˆπŸ’–βœ¨βœ¨βœ¨βœ¨πŸ₯Ί,,πŸ‘‰πŸ‘ˆπŸ’–βœ¨βœ¨βœ¨βœ¨πŸ₯Ί,,πŸ‘‰πŸ‘ˆ
... should yield ✨✨✨✨πŸ₯Ί,πŸ‘‰πŸ‘ˆβœ¨βœ¨βœ¨βœ¨πŸ₯Ί,πŸ‘‰πŸ‘ˆβœ¨βœ¨βœ¨βœ¨πŸ₯Ί,πŸ‘‰πŸ‘ˆ

@kotx
Copy link
Author

kotx commented Jun 26, 2021

@romdotdog Seems to be because the default inline bottom prefixes and suffixes collide with the byte separators. It works after replacing them/disabling automatic encoding.
https://github.com/bottom-software-foundation/power-bottom/blob/need_top/components/Settings.jsx#L65
This seems to be the case on your fork as well. I'd be glad to open a PR, but I'm not sure what to put as the default prefix/suffix.

@romdotdog
Copy link

I'll pull from upstream whatever happens :-)
How about tilde (~)?
I'd also like to hear @SebbyLaw's thoughts

@kotx
Copy link
Author

kotx commented Jul 9, 2021

I'll pull from upstream whatever happens :-)
How about tilde (~)?
I'd also like to hear @SebbyLaw's thoughts

Tildes (~~) are used in markdown for strikethrough, though.

@SebbyLaw SebbyLaw added the bug Something isn't working label Jul 14, 2021
@SebbyLaw SebbyLaw changed the title Encoder seems to be broken Malformed output when using bottom command with inline automatic encoder Oct 13, 2021
@SebbyLaw SebbyLaw pinned this issue Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants