Sgf download is missing CA[UTF-8]. Cannot be correctly opened in a different sgf editor

For example when downloading https://online-go.com/api/v1/reviews/344433/sgf

The file actually is UTF-8 encoded, but the encoding is not specified on the file with the CA property as it should (I think that “sgf default is latin1” according to the spec). That causes troubles when loading it with some other software. Adding the CA[UTF-8] property fixes this. I imagine that fixing this should be very easy, although it might be a backend change (I do not know if backend directly works with games sgf or only with an internal representation, so that sgf are generated dinamically on request).

Also, a lower-priority problem is that valid sgf files that are not UTF-8 encoded (but which correctly specify the encoding) are not correctly loaded into OGS (when using sgf library to upload them) but instead “Error 500” is shown. At least no “incorrect file” is generated, so the file can be converted to UTF8 manually before upload.

Added a git issue : https://github.com/online-go/online-go.com/issues/695

@anoek , is this the correct procedure for bug reports?

1 Like

I am not anoek, but I dare say it is, thank you for the detailed work :), much appreciated