Closed J0SLAN closed 7 years ago
screen shots and a better description would be helpful.
v
is your � value
=unicode.wlen(v)
=unicode.len(v)
=#v
for i=1,#v do io.write(string.byte(v[i]), ' ') end
OpenOS 1.6.2. I mean the actual � character. The one in the bug report. I think it's 0xFFFD. Pasting it works. And it's not just errors. Changing my report to say errors doesn't help anything; at best it makes it incomplete. Screenshotting the effects won't help much, but here's an error that can happen when pasting it around: And here's one for putting the cursor in some places when the file already has the character: To see the visual effects you just have to mess around with it. Inconsistency is the main thing.
Thanks for the screen shot, it was quite helpful. It told me immediately what the problem is, and I tested it to confirm:
This is a problem with unicode 0xFFFD is that the utf8 engine OC is using cannot correctly truncate this string. This isn't a problem with /bin/edit specifically, but with our unicode library and its wtrunc function.
This is actually the same problem faced by #2384 In fact, if you fill a file large enough with 0xFFFD, and then cat
it to the screen, you'd hit the same error.
� in the stock editor of OpenOS causes weird errors* and effects** of weird proportions.