aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_text.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-02-04 17:35:23 +0100
committerSiri Hansen <[email protected]>2013-02-04 18:09:34 +0100
commiteccb4b5b7d7a7a3aa7bb8f7e541a9d8c4257ca9f (patch)
treebfa03f0e5d9babbdb1b7ee9e7de51c313c823560 /lib/mnesia/src/mnesia_text.erl
parentf84427d53db9843227adda945fb10ed19fc762b8 (diff)
downloadotp-eccb4b5b7d7a7a3aa7bb8f7e541a9d8c4257ca9f.tar.gz
otp-eccb4b5b7d7a7a3aa7bb8f7e541a9d8c4257ca9f.tar.bz2
otp-eccb4b5b7d7a7a3aa7bb8f7e541a9d8c4257ca9f.zip
[test_server] Don't write unicode strings to latin1 log files
The unicode update of test_server for R16A introduced a few potential errors when logging to files. Sometimes ~tp or ~ts was used for formatting also when writing to files that were not opened with the {encoding,utf8} option. If then the argument contained unicode characters above 255, the file descriptor would crash. This has been corrected by the following modifications: * Since the 'unexpected_io' log file is used only when the test case HTML file is not available (e.g. between test cases), this file is now also a HTML file and as other test_server HTML logs it is always UTF-8 encoded * Since it is possible to change which information is going to which log file (with test_server_ctrl:set_levels/3), we do not have full control over which information is written to which file. This means that any printout could be written to the 'major' log file (suite.log), which was earlier encoded as latin1. To avoid crashing this file descriptor due to unicode strings, the 'major' log file is now also encoded in UTF-8 (possible incopatibility). * The cross_cover.info file is no longer a text file which can be read with file:consult/1, instead it is written as a pure binary file using term_to_binary when writing and binary_to_term when reading. * The encoding of the file named 'last_name', which only content is the path to the last run.<timestamp> directory, is now dependent on the file name mode of the VM. If file names are expected to be unicode, then the 'last_name' file is UTF-8 encoded, else it is latin1 encoded. Also, ~tp is changed back to ~p unless it is somehow likely that the argument includes strings. It is not obvious that this is the correct thing to do, but some decission had to be taken...
Diffstat (limited to 'lib/mnesia/src/mnesia_text.erl')
0 files changed, 0 insertions, 0 deletions