This is something I've known for awhile, and has caused me no small amount of pain. I just about lost it tonight when I noticed it was causing me issues while editing rules.csv. Creating this PSA to spare others my pain haha...
EXCEL ENCODES EVERYTHING IN THE WRONG FORMAT BY DEFAULT. DO NOT USE EXCEL FOR EDITING STARSECTOR-RELATED CSV FILES.
If you're getting perplexing errors and have no idea where they are coming from even when all of the files look exactly as they should, there's a chance that Excel is saving all of your files in ANSI format rather than UTF-8 (without BOM). Starsector uses UTF-8 (without BOM). This can cause any number of issues, from improperly displayed text, to a full on CTD.
You can detect the currently used encoding in Notepad++ clicking on the Encoding menu at the top and seeing what's selected.
In the event you are using the wrong encoding, you can it in Notepad++ by selecting Encoding>Convert to UTF-8 without BOM. Problem solved. Additionally, LibreOffice has significantly less trouble saving in the correct format. It's also free.