Error: "File format is not valid"

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

Cause

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.

Solution

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.

  1. Close all open documents and programs on your computer.
  2. Press the Windows key.
  3. Type Settings
  4. Select Time & Language
  5. Click Language.
  6. Under Related settings, click Administrative language settings. (Screenshot)
  7. On the Region window, click the Administrative tab.
  8. Click Change system locale. Here you will need administrator rights. (Screenshot)
  9. Clear the Beta: Use Unicode UTF-8 for worldwide language support checkbox. (Screenshot)
  10. Click OK.
  11. Restart your computer.
Is article helpful?