PGN format

For suggestions for new features to add to the site. Even if you don't have a sugestion at least vote on the features important to you.
Post Reply

Would you gain any profit from a corrected PGN format?

Yes, I'd appreciate that.
8
73%
I didn't even notice the PGN format has been flawed. But generally I think standards should be regarded properly.
2
18%
I don't care at all!
1
9%
 
Total votes: 11

joelag
Posts: 55
Joined: Sat May 06, 2006 3:30 pm
Location: Rhineland/Germany

PGN format

Post by joelag » Fri Apr 20, 2007 3:14 pm

I just realised that my post from 2007-04-02 only didn't get any reply because I posted it into the wrong group. Well I guess, here it belongs to, so here it is again, this time including a poll :D

Thanks for this great site and thanks again for the possibility to download a game's PGN move list via the link View PGN Move List. But unfortunately net-chess's PGN notation is somewhat flawed :cry:. A definition of the PGN standard can be found here PGN Standard.

I'd really appreciate it if the worst flaws could be corrected. IMHO it can't involve too much of coding.

1. The tag names White Time Left and Black Time Left are not valid. Valid tag names may only contain letters, digits, and the underscore character. A space is not allowed. I'd propose WhiteTimeLeft.

2. Castling is denotated with the letter O and not with the digit 0!

3. If the result isn't determined yet the move section must be finished with an asterisk *.

OK, these are the worst flaws. I'm not sure if there are others. But the 3 given flaws make my chess game display software stumble :( and I always have to correct them manually before importing any net-chess PGN file.

Here's the flawed as-is-state:
[Event "m1174866056"]
[Site "net-chess.com"]
[White "joelag"]
[Black "triceratops"]
[Result "*"]
[White Time Left "038d 04:17:26"]
[Black Time Left "034d 11:59:03"]
[Game "g1104825925"]

1.c4 Ng8f6 2.Nb1c3 g6 3.e4 Bf8g7 4.d4 d6 5.h3 0-0
And this is how it should look like:
[Event "m1174866056"]
[Site "net-chess.com"]
[White "joelag"]
[Black "triceratops"]
[Result "*"]
[WhiteTimeLeft "038d 04:17:26"]
[BlackTimeLeft "034d 11:59:03"]
[Game "g1104825925"]

1.c4 Ng8f6 2.Nb1c3 g6 3.e4 Bf8g7 4.d4 d6 5.h3 O-O *
If there's any doubt about any of the above issues just consult http://www.very-best.de/pgn-spec.htm.

CU, Joe

gmiller
Site Admin
Posts: 1388
Joined: Sun Mar 14, 1999 11:13 am
Location: Jeffersonville, IN
Contact:

Post by gmiller » Sun Apr 22, 2007 10:35 am

Those should all be fixed now. I started to work on it when you posted your first message but got sidetracked.
Greg Miller

joelag
Posts: 55
Joined: Sat May 06, 2006 3:30 pm
Location: Rhineland/Germany

Digit zero vs. letter O

Post by joelag » Sun Apr 22, 2007 2:04 pm

Thank you Greg!

Now it really looks like standard PGN :wink:

If you only could replace the zeroes in "0-0" with "O"'s it would be perfect.

CU, Joe

joelag
Posts: 55
Joined: Sat May 06, 2006 3:30 pm
Location: Rhineland/Germany

PGN format is correct now

Post by joelag » Tue Apr 24, 2007 2:10 pm

I just noticed that Greg replaced the zeroes with the letter O. Perfect! :D

Now I can import it without any problem. Thank you very much, Greg!

CU, Joe

Post Reply