sledgehammer icon indicating copy to clipboard operation
sledgehammer copied to clipboard

Problems with unicode charecters

Open StratusFearMe21 opened this issue 2 years ago • 1 comments

It seems that when sending non-ascii characters across the MsgChannel, it creates problems. 20230519_21h25m24s_grim As you can see, all of these option elements were created just fine, until a non-ascii quotation mark was thrown into the mix, and it caused some sort of under/overflow.

for p in paths {
    channel.create_element(Element::option, None);
    channel.set_attribute(Attribute::value, p, MaybeId::LastNode);
    channel.set_text(p, MaybeId::LastNode);
    channel.append_child(MaybeId::Node(EXIST_DIR_SELECT), MaybeId::LastNode);
}
channel.flush();

This is the code that creates these elements where EXIST_DIR_SELECT is a valid ID to a select element that was built at the beginning of my codebase.

Thanks in advance for taking this into consideration :smile:

StratusFearMe21 avatar May 20 '23 01:05 StratusFearMe21

Thank you for letting me know about this bug! I believe this was fixed in sledgehammer-bindgen which is a generalized version of this library for any set of instructions. I'm going to mark this repo as read only because I no longer plan to continue development in this repository. Further updates will be provided in the sledgehammer-bindgen repo.

If you run into the same bug with sledgehammer-bindgen feel free to copy this issue over to that repo.

ealmloff avatar May 20 '23 01:05 ealmloff