In this question (How can you encode a string to Base64 in JavaScript?) the 3rd and 6th answer are basically error corrections to the second answer. The 7th and 17th answer at least add some few lines to add features.
I have an additional error correction (that I already published on gitlab). Adding yet another "error correction answer" feels wrong, but editing five answers to correct the bug also feels wrong...
So how should I proceed?
Note: I read here, that I shouldn't edit an answer to make it correct, if it changes the original authors intent, but I don't think that's the case here. I believe the authors of these answer wanted to encode the string as UTF-8 and then base64-encode the resulting byte sequence. I don't believe, that they wanted to do the UTF-8 encoding incorrectly. Yet the question remains: Should I comment on those answers instead of editing them?
In my opinion it would be best, if all corrections (those from answers 3 and 6 as well as my corrections) were incorporated into the second answer, but that would basically cause the same problems described here (give credit fairly, plagiarism).