[solved] csv output file in UTF-8 with BOM encoding
Hi all,
Is it possible to save csv output file (the one, which saved with the logger) in UTF-8 with BOM encoding?
By default it is saved as an UTF-8 without BOM.
Thank you and best regards,
Boris.
Comments
Hi Boris,
With a small hack you can do this, yes. If you place the following script in the prepare phase of an
inline_scriptat the beginning of your experiment, you will have a logfile withutf_8_sigencoding, which I believe corresponds to UTF8 with BOM.You can use any standard codec, by the way, in case
utf_8_sigis not the correct one:Just as a small aside, a BOM header is not necessary for UTF8 encoding. The reason is that UTF8 uses bytes as low-level units, instead of integers or some other unit that takes more than one byte. The byte order is therefore irrelevant, kind of like deciding whether you will read a single letter from left to right or right to left. But then again, you may have your reasons ;-)
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks a lot!