Talk:Portable Game Notation

Comments
With respect to the person with IP Address: 213.78.76.88

"Why the XML evangalism in a PGN context"

It is very sad that people like this fail to see the truth of the matter or are even not bothered to find out what XML is before deleting a very valid point that PGN is an increasingly backward ,primitive, and non-extensible tagging of a chess game. There are already various XML implementations for chess if the person had been at all bothered to find out or investigate this area.

Cax XML :- http://www.chesscity.com/RESOURCES/chess_tech.htm Checkmate XML: http://www.xml.com/pub/a/2004/08/25/tourist.html Simple XML for chess: http://chess.arska.org/sxc/ XML Definitions for chess: http://palamede.editthispage.com/stories/storyReader$47 Chess viewer making use of XML: http://www.renderx.com/chess.html PGN XML viewer: http://www.cybercom.net/~zbrad/Chess/pgnxml/ Chess and XML: http://geekswithblogs.net/ansari/archive/2004/08/28/10328.aspx
 * This is an article on PGN, not XML. --Malathion 13:40, 21 Jun 2005 (UTC)

And that's not to say there may be advantages to XML; actually, the only practical one I can come up with is that it's inherently extensible while PGN isn't. But XML is, all too often, the hammer looking for yet another nail to bend all out of shape.

PGN is trivial to parse, generate and manipulate, easily human-readable and human-writable, and has served its specific purpose very well for many years. XML is none of these things, and simply recreating the equivalent of PGN with XML does nothing except add unnecessary complexity. Might as well add an ASN.1 wrapper.

PGN is far from being trivial to parse - SAN requires the implementation of a full-blown chess engine. Look at the rules, it's actually very difficult to implement from scratch.

To quote from one of the articles listed above:

The numbered items, on the other hand, verge on the inscrutable.

Anyone who has ever studied chess should giggle gleefully at this! The author is, of course, referring to the notation format used to describe chess games for at least the last 100 years. (We've switched from descriptive to algebraic notation during that time, but the basic format has remained the same.)

In short: if it ain't broke, don't fix it. PGN isn't perfect, but it does its job very well for at least 99% of what it's used for. And if you are going to fix it, make sure you understand the problem first! Anyone who writes nonsense like the above quote is purposefully ignoring a lot of history in the name of "progress".--12.103.251.203 15:41, 20 September 2005 (UTC)

Example
The example shown should include all the different types of things in a PGN that are possible: Queen-side castling, promotions, two knights able to move to the same spot, annotations, etc. I understand that it should be a notable game (such as that of Fischer and Spassky), but we should find another one, so that people can actually see how it all fits together. 70.111.219.18 12:39, 23 March 2006 (UTC)


 * PGN relies on Standard Algebraic Notation (SAN) for all that. Thus, it may be enough to refer to https://en.wikipedia.org/wiki/Algebraic_notation_(chess) which covers that subject. Athulin (talk) 15:22, 23 April 2020 (UTC)

Please add clarification on stalemate
I found just like the example that stalemates are noted by adding the 1/2-1/2 notation at the game end, but it would be helpful to note there is no notation for stalemate in the text. Ryan
 * Actually, that's how draws are indicated, not stalemates specifically. All stalemates are draws, but not all draws are stalemates.&mdash; Chowbok  ☠  23:05, 22 November 2016 (UTC)

MIME type
What would the MIME type of the PGN file be? application/x-pgn or something like this? —msikma (user, talk) 16:15, 23 February 2008 (UTC)

After doing some searching, I found out it's application/x-chess-pgn. —msikma (user, talk) 16:16, 23 February 2008 (UTC)
 * It is now officially application/vnd.chess-pgn.&mdash; Chowbok  ☠  00:37, 2 July 2016 (UTC)

This article contains no context
This article needs some context : something about the history of PGN, as well as its advantages + disadvantages. All the article is at the moment is an instruction manual, but see the guideline Wikipedia is not a manual, guidebook or textbook. Peter Ballard (talk) 03:11, 10 November 2008 (UTC)

An in-depth description of something is NOT an "instruction manual". Some history would be nice, but not because of your supposition, which is incorrect. —Preceding unsigned comment added by 71.197.124.181 (talk) 09:23, 29 May 2009 (UTC)


 * I agree that it is not a manual. Bubba73 (talk), 15:10, 29 May 2009 (UTC)

Chesbase PNG Formats
The EF BB BF prolog is actually the Byte order mark, indicating unicode encoding (presumably utf-8, since the rest of the file still looks like regular ascii). — Preceding unsigned comment added by 83.76.190.72 (talk) 14:19, 12 September 2016 (UTC)

I added that to the article but that section looks like original research. Is there prescribed encoding for PGN files? --78.128.195.46 (talk) 23:57, 16 October 2016 (UTC)


 * The PGN Standard document (though I don't know if the copy I have found is authoritative) says that PGN files must be in a subset of the ISO 8859-1 encoding. (That is presumably intended to be ISO 8859-1 for graphic characters, and presumably the control characters of ANSI/ISO 646/..., as 8859-1 does not specify control characters at all. PGN also requires support for \n, at the very least. Athulin (talk) 15:18, 23 April 2020 (UTC)


 * Added: Best source for PGN standard right now seems to be http://tim-mann.org/Standard . See http://www.anders.thulin.name/posts/pgn/ for the reason why. Athulin (talk) 20:51, 27 December 2021 (UTC)

List of programs
It's so universal and ubiquitous now, it would probably be easier to make a list of chess software that can't process PGN. MaxBrowne2 (talk) 05:41, 19 May 2021 (UTC)

Official spec in GitHub repo
Is the github repo "official" or widely adopted in any capacity, or just an off-hand fork? It is created by Ferdinand Mosca, but if the 13 Github stars are anything to go by, it isn't widely adopted. Wqwt (talk) 22:33, 28 July 2022 (UTC)


 * I'm not sure if @MaxBrowne2 saw this but this edit got rid of mention of the github repo https://en.wikipedia.org/w/index.php?title=Portable_Game_Notation&diff=prev&oldid=1101954154
 * I will say TalkChess forum is pretty widely known in the chess programming community. Wqwt (talk) 05:03, 16 July 2023 (UTC)
 * "Official" is officially a deprecated word (MOS:WTW). There is no single authority on PGN spec, it was developed on the internet (usenet in the 1990s to be precise) and grew on the internet. Just about all chess software understands it though, even if it is not written strictly within the original PGN protocols like O-O rather than 0-0. MaxBrowne2 (talk) 05:28, 16 July 2023 (UTC)

Movetext
I understand that SAN is sufficient, but is it *allowed* to use LAN (long algebraic notation, like Ba1xh8)? I'm asking because I have a file with LAN and I would like to make a PGN from it. It does not seem forbidden to put the "depature square" even if there's no ambiguity, but it seems that, e.g., on c.c., this is not recognized when I paste it into the diagram editor... (unless there's another reason...?) &mdash; MFH:Talk 05:58, 4 July 2024 (UTC)
 * Depends on the software probably. The article describes the PGN standard. Most software can cope with minor deviations from the standard like 0-0 instead of O-O, but I doubt many can deal with long form algebraic. Maybe someone's written an app that can convert long form to short form? MaxBrowne2 (talk) 12:17, 4 July 2024 (UTC)