Issue Type: Other Impact: Moderate Frequency: Constantly Date First Experienced: 2021-03-04 18:03:00 (-08:00) Date Last Experienced: 2021-03-04 18:03:00 (-08:00)
Reproduction Steps:
Print a table with enough room for you to copy from.
local p = Instance.new("Part")
p.Parent = workspace
for i = 1, 10 do
p:SetAttribute("Attr" .. i, i^2)
end
print(p:GetAttributes())
Copy the code, then paste it into a script. You will see this error:
Expected Behavior:
I expect for there to not be any special Unicode characters anywhere. I also expect the key-value pairs to be indented using tabs, not spaces. Or at least respecting the Indent Using Space setting, so it would use spaces if it were checked, tabs otherwise.
Actual Behavior:
Unicode character U+a0 gets added within the spaces.
Workaround:
Writing it out myself or using a custom function that pretty-prints tables.
Ah, you’re correct. It seems to me that this is a consequence of the formatting used on tables. I copied the output and converted it to hexadecimal Unicode codepoints:
It doesn’t even have to be a table, printing anything will print two u+a0 characters then the text.
While I’m not in a rush to use it, I wrote a bit of code that copies the data of all parts of a specified model and prints the code needed to generate those parts via script. This removes the need to have the model in the game at all as the code will create it from nothing.
Using ctrl+f to replace those characters doesn’t work either, and I made sure to copy the characters to the search bar.