Following the KiCad file formats specification chapter 4.4 - Identifiers and Strings:
A string may not contain an actual newline or carriage return, but it may use an escape sequence to encode a
newline, such as \n.
If a string has any of the following conditions, then it must be quoted with a leading and trailing double quote
character, otherwise it is acceptable to not quote the string:
has one or more of the following 4 separator bytes: ASCII space, tab, '(', or ')'.
has one or more of the following bytes: '%', '{', or '}'.
has a length of zero bytes, and you need a place holder for the field, then use "".
includes a byte of '-', and this byte is not in the first position of the string.
A string, including a module name, should be quoted when it contains an ASCII space character. However, Madpart's KiCad exporter exports the module name with an escaped space character instead quoting the name.
I did not test if this also occurs on different fields.
Following the KiCad file formats specification chapter 4.4 - Identifiers and Strings: A string may not contain an actual newline or carriage return, but it may use an escape sequence to encode a newline, such as \n. If a string has any of the following conditions, then it must be quoted with a leading and trailing double quote character, otherwise it is acceptable to not quote the string:
A string, including a module name, should be quoted when it contains an ASCII space character. However, Madpart's KiCad exporter exports the module name with an escaped space character instead quoting the name.
I did not test if this also occurs on different fields.