Wednesday, December 2, 2009

calling all web geeks

A technical question: I thought that ChessFlash left the game in "pure" PGN. When I cut & paste from ChessFlash to PGN (by clicking thru on the link, then highlighting the target page's PGN input), the PGN comes out garbled on ChessBase. Am I doing something wrong?


Glenn Wilson said...

There are different ways of using chessflash. One uses the actual pgn file in which case it is the actual, unchanged uploaded pgn file.

In the other approach, when the pgndata is included within the html web page, it is no longer in pure pgn format (pgn and html standards are inconsistent in some ways). But, in the workflow you describe we try to get back to valid pgn data in the text box. I'll take a look further this weekend (I won't have time until then) and see if I can provide you more specific info...

Bill Brock said...

Thanks for the explanation, Glenn!

GreenCastle said...

ChessFlash doesn't know what to do with some of the symbols ChessBase does. I noticed for instance the unclear symbol becomes the string "unclear" and there and probably others as well.

Glenn Wilson said...

I have been able to reproduce what you mention in this post by copying the pgn data into ChessBase Light.

The issue appears to be that ChessBase requires that the tags and the moves do not appear on the same line. This is from a very small amount of experimentation but seems to be the issue for the game/link in this post.

A work-around is to edit the pgn data in the chessflash pgn text box before copying it to ChessBase. Move the cursor to before the first move and press enter. (In this example this is after the last tag and before the first move: [PlyCount "61"] 1. e4 c5).

Glenn Wilson said...

The issue you are describing is a different issue. Some of the characters used in chess notation are not commonly available in standard fonts and ChessFlash uses standard fonts.

Specifically, the PGN specification uses what are called Numeric Annotation Glyphs to record certain common subjective move annotations. A few examples:
$1 good move (traditional "!")
$13 unclear position
$18 White has a decisive advantage
$22 White is in zugzwang

If a pgn file has a NAG of $1 ChessFlash displays the "!" character. Some NAGs do not easily translate to available characters so ChessFlash displays something else ("unclear" for $13) or nothing.

In the workflow described in this blog entry, if you click through to the game and copy the pgn data from the text box, it will not have the word "unclear" but it will have the original NAG of $13 which is what should happen.

It is true that what ChessFlash displays is not the same as the raw pgn data -- but, that is true of most pgn viewers including ChessBase.

I hope that was not "unclear." :-)