4 ms·
I'm confused, so is Go restricted to UTF-8 only filenames, because it can read/write arbitrary byte sequences (which is what string can hold), which should be s
by commandersaki 1y ago
I'm confused, so is Go restricted to UTF-8 only filenames, because it can read/write arbitrary byte sequences (which is what string can hold), which should be sufficient for dealing with other encodings?
- yencabulator 1y agoGo is not restricted, since strings are only conventionally utf-8 but not restricted to that.
- commandersaki 1y agoThen I am having a hard time understanding the issue in the post, it seems pretty vague, is there any idea what specific issue is happening, is it how they've used Go, or does Go have an inherent implementation issue, specifically these lines: If you stuff random binary data into a string, Go just steams along, as described in this post. Over the decades I have lost data to tools skipping non-UTF-8 filenames. I should not be blamed for having files that were named before UTF-8 existed.
- comex 1y agoYeah, the complaint is pretty bizarre, or at least unclear.
- yencabulator 1y agoLet me translate: "I have decided to not like something so now I associate miscellaneous previous negative experiences with it"
- kragen 1y agoThe post is wrong on this point, although it's mostly correct otherwise. Just steaming along when you have random binary data in a string, as Golang does, is how you avoid losing data to tools that skip non-UTF-8 filenames, or crash on them.