View Single Post
Old 08-23-2011, 11:02 AM   #79
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Quote:
Originally Posted by sergeyvl12
Thanks for file, I'll investigate and fix soon.
Hi!

There are 3 reasons why pbchess is failed to read this PGN file:

1. Wrong file encoding. Pocketbook works with the UTF-8 encoding, but this file uses WINDOWS-1250 encoding. It should be converted to UTF-8. I've described one way how to convert text file to UTF-8: http://pbchess.vlasovsoft.net/en/manual.html (Working with PGN bases);

2. Wrong file format. The PGN tag "FEN" describes an initial position on the chess board. This file has wrong "FEN" tag format. FEN should have 6 fields, as described here: http://www.chessclub.com/help/PGN-spec

"A FEN description has six fields. Each field is composed only of non-blank
printing ASCII characters. Adjacent fields are separated by a single ASCII
space character."

... and here: http://en.wikipedia.org/wiki/Forsyth...wards_Notation

But the games exist in this file that have illegal FEN, for example:

[FEN "4k3/8/4K3/8/8/7R/8/8 w - 0 1"]

it should be:

[FEN "4k3/8/4K3/8/8/7R/8/8 w - - 0 1"]

It's simple to fix this format in any text editor, using find/replace
"w -" -> "w - -"
"b -" -> "b - -"

3. pbchess supposes that the interval between 2 games should be 1 empty line. But in this file the intervals with 3 empty lines are met. I'll fix the PGN parser to support arbitrary intervals and release the 1.2.1.2 version on Friday (see my roadmap).

Last edited by sergeyvl12; 08-23-2011 at 11:06 AM.
sergeyvl12 is offline   Reply With Quote