Chessbase can't read pgn file from CCC tournament

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Carbec
Posts: 144
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Chessbase can't read pgn file from CCC tournament

Post by Carbec »

Hi,
I tried to read a pgn file with Chessbase 17, and it don't understand it. I tried also with Arena, and Scid vs PC , both work. Anyone could do it ?
Thanks for info

Philippe
Carbec
Posts: 144
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Chessbase can't read pgn file from CCC tournament

Post by Carbec »

Following...

I tried with a file with only one game, same result.
BUT !!! with CB17 opened, if I open the pgnfile with a text editor, select a game, and made a copy-text (Ctrl-C), suddenly this game opens correctly in CB17.
There is someting very weird here.
Ras
Posts: 2523
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Chessbase can't read pgn file from CCC tournament

Post by Ras »

Can you give a link to the PGN in question, e.g. zipped before upload?

Copy/pasting into the forum won't do because that works also on your end anyway.
Rasmus Althoff
https://www.ct800.net
Carbec
Posts: 144
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Chessbase can't read pgn file from CCC tournament

Post by Carbec »

This is a tournament where Zangdar played recently :
https://kirill-kryukov.com/chess/discus ... p?id=56153
Ras
Posts: 2523
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Chessbase can't read pgn file from CCC tournament

Post by Ras »

The PGN file starts with hexadecimal EF BB BF. This is a UTF-8 BOM (byte order mark), which is neither required nor recommended for UTF-8 because the byte layout is defined anyway (https://en.wikipedia.org/wiki/Byte_order_mark). A BOM is only useful for encodings such as UTF-16 or UTF-32 (which nobody uses). That said, robust text loading routines in applications should check for a useless UTF-8 BOM and skip over it.

I've removed these three bytes at the beginning with a hex editor - can you check whether CB17 loads that?
Rasmus Althoff
https://www.ct800.net
Carbec
Posts: 144
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Chessbase can't read pgn file from CCC tournament

Post by Carbec »

Where is the corrected file ?
Ras
Posts: 2523
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Chessbase can't read pgn file from CCC tournament

Post by Ras »

Carbec wrote: Mon May 27, 2024 8:08 pmWhere is the corrected file ?
See your PNs. I'll delete that after download.
Rasmus Althoff
https://www.ct800.net
Carbec
Posts: 144
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Chessbase can't read pgn file from CCC tournament

Post by Carbec »

I tested the new file, but I got the same result. The game list is correctly read, but not the games themselves.
How can I put an image here ?
Norm Pollock
Posts: 1059
Joined: Thu Mar 09, 2006 4:15 pm
Location: Long Island, NY, USA

Re: Chessbase can't read pgn file from CCC tournament

Post by Norm Pollock »

Try "trim.exe" in a command prompt window. I cannot try it because I do not have the pgn data file you are referring to.

Here is the download link:

https://www.mediafire.com/file/uycdnk9f ... m.exe/file

Usage: trim filename.pgn

Output: outR.pgn
Updated links for 40H Tools and Databases
http://40Hchess.epizy.com
http://nk-qy.info/40h
Carbec
Posts: 144
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Chessbase can't read pgn file from CCC tournament

Post by Carbec »

Hi,
Unfortunately, trim didn't worked.
But, after exporting to pgn a game, I noticed that several tags were missing.
I did some tests, and I discovered that the tag "variant" is the problem.
So I removed all theses tags in a pgn file, and voila, the file is correctly read.

Anyways, there is a bug in CB. If I copy a game , with the tag "variant" included,
and use the paste option in CB, the game is correctly read.
So why "paste" is OK, and not the reader ????

So I can now read the pgn files from CCC with a little editing.
I tested also Banksgui and Shredder, both are OK.