Forums

Problem with game editor

Sort:
Phssthpok

I was just trying to insert a chess game using the game editor and found a minor, but potentially annoying, problem.

If you use the closing brace character "}" in any of the comments, the whole game gets truncated at that point when you insert it.

The problem is that comments in the PGN file format are enclosed in braces so any embedded closing brace is treated as the end of the comment and the remainder of the comment corrupts the rest of the game data.

The reason I was setting up the game was to see how chess.com handled exactly this problem as it is not specified in the PGN format specification.

erik

we'll take a look...

Phssthpok

Thanks, erik (or should that be Erik ?)

Not urgent on my behalf but I could imaging someone having carefully annotated a whole game losing it.

Phssthpok

I just found another problem, I'm afraid. If you include quotes in any of the game tags (player names, event, site, etc) then the details do not come up corrently in the displayed game.

In this case, the problem is that the tag values are quote-delimited in the PGN format. The specification says any quotes should be escaped with a backslash (i.e. \") and any backslash characters should be doubled up (i.e. \\).

If you're wondering why I'm trying to break your game editor, I'm currently trying to write a program to record and annotate chess games and where the PGN format spec is a bit vague I'm seeing what the game editor does in the situation.