Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EN Dash (and possibly EM Dash) not Accepted in Analysis Board PGN Paste #16268

Open
pqcheng opened this issue Oct 25, 2024 · 6 comments
Open

Comments

@pqcheng
Copy link

pqcheng commented Oct 25, 2024

Exact URL of where the bug happened

https://lichess.org/analysis

Steps to reproduce the bug

  1. Go to Tools -> Analysis Board
  2. Paste PGN with EN Dash or EM Dash instead of ASCII hyphen. See following PGN for example:
  3. 1.e4 c5 2.Nf3 Nf6 3.e5 Nd5 4.Nc3 e6 5.Nxd5 exd5 6.d4 Nc6 7.dxc5 Bxc5 8.Qxd5 d6 9.exd6 Qb6
    10.Qe4+ Be6 11.Qh4 Bxd6 12.c3 Be7 13.Qf4 Bc5 14.Ng5 0–0–0 15.Be2 Nd4 16.cxd4 Rxd4 17.Qf3
    Bb4+ 18.Kf1 Bg4 19.Qxg4+ Rxg4 20.Bxg4+ f5 21.Be2 Re8 22.Bf4 Qd4 23.Rc1+ Kd8 24.g3 Qxb2
    25.Rd1+ Kc8 26.Rc1+ Kd8 27.Bh5 g6 28.Bf3 Re7 29.Kg2 Qxa2 30.Rhd1+ Rd7 31.Rxd7+ Kxd7
    32.Rc7+ Ke8 33.Rxb7 Bc5 34.Bc6+ Kd8 35.Nf7+ 1–0

What did you expect to happen?

Expect for the PGN to be uploaded normally.

What happened instead?

Saw the following error instead: PGN error: Can't play Be2 at move 14, ply 28

Basically, Queenside Castling with EN Dash was not accepted as a valid move on move 14, ply 28, and most likely ignored.
Instead, move 15, ply 29 (Be2 by White) was treated as move 14, ply 28, causing the error.

Operating system

MacOS Sequoia 15.01

Browser and version (or alternate access method)

Safari Version 18.0.1

Additional information

The original PGN comes from a monthly chess newsletter, which was most likely just copied and pasted from some chess software, which happens to use EN Dash instead of ASCII hyphen.
Used an ASCII->hex converter to confirm that the dash corresponded to Unicode 0x2013

@pqcheng pqcheng added the bug label Oct 25, 2024
@kraktus
Copy link
Member

kraktus commented Oct 25, 2024

Also impact scalachess probably

@lenguyenthanh
Copy link
Member

@kraktus
Copy link
Member

kraktus commented Oct 25, 2024

so the issue is within the lichess import parser?

@lenguyenthanh
Copy link
Member

iirc we moved it from scalachess to client for quite a while.

@kraktus
Copy link
Member

kraktus commented Oct 25, 2024

ah yes, I was confusing with /import

@kraktus
Copy link
Member

kraktus commented Oct 25, 2024

Probably chessops then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@lenguyenthanh @pqcheng @kraktus and others