RandomSec/main/tests
Tom Morris e6ed8e5d62
Save preferences JSON using UTF-8 encoding. Bulletproof prefs load. (#2657)
* Save preferences JSON using UTF-8 encoding. Bulletproof prefs load.

Fixes #2543. Fixes #2627.

Always use UTF-8 to write JSON because platform default encoding
might not be legal JSON (e.g. ISO 8859-1).

Also be more conservative about keeping backups if we fail to write.

* Handle case where backup prefs is better than more recent

* Recover from corrupted prefs with null starred list.

Fixes #2544. Replaces null with an empty list.

* Run tests with non-UTF-8 encoding

Make sure that we don't depend on UTF-8 being the default encoding
because it isn't true everywhere (e.g. Windows)

* Add test for non-ASCII chars in workspace.json

This depends on the default Java encoding being something
other than UTF-8 to test properly.
2020-06-06 10:00:01 +01:00
..
client/src Correcting typo that was breaking one UI test 2013-12-17 01:40:45 -03:00
data Add customMetadata to project metadata parsing test 2019-06-04 12:02:49 +01:00
server Save preferences JSON using UTF-8 encoding. Bulletproof prefs load. (#2657) 2020-06-06 10:00:01 +01:00