When using Citavi under Windows 10, a problematic Windows 10 system setting can lead the following error message to occur:
System.ArgumentException: File format is not valid. at System.Windows.Forms.RichTextBox.StreamIn(Stream data, Int32 flags) ...
The error message can occur when you:
- open or close a project
- search for a reference, for example, using the "Go to" feature (Ctrl+E)
- are working in the Citation Style Editor
This error is caused by the incompatibility of the Microsoft Windows Forms RichTextBox content control with rich text (RTF) containing Unicode encoding. RTF files with Unicode encoding begin with the preamble "\urtf" instead of the usual "\rtf". Although this preamble is in accordance with the Rich Text specifications and the Windows API documentation, it's not supported by Windows' own RichTextBox. Microsoft is aware of this error.
The following solution is a workaround until Microsoft fixes the issue with an update. The update to Citavi 6.4 will also offer a solution.
To perform the following steps, you need to have administrator rights on your computer.
- Close all open documents and programs on your computer.
- Press the Windows key.
- Type Settings.
- Select Time & Language.
- Click Language.
- Under Related settings, click Administrative language settings. (Screenshot)
- On the Region window, click the Administrative tab.
- Click Change system locale. Here you will need administrator rights. (Screenshot)
- Clear the Beta: Use Unicode UTF-8 for worldwide language support checkbox. (Screenshot)
- Click OK.
- Restart your computer.