Answers.Body: <p><a href="https://sourceforge.net/p/pgn4web/wiki/PGN_Support/" rel="nofollow noreferrer">https://sourceforge.net/p/pgn4web/wiki/PGN_Support/</a></p>
  
  <p>if you read that, you will notice:</p>
  
  <p><a href="https://i.sstatic.net/MkmBd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MkmBd.png" alt="Screenshot"></a>
   <code>in order for pgn4web to display those characters correctly, the PGN file should be saved in unicode UTF-8 format.</code></p>
  
  <p>you <em>can</em> save PGN as UTF-8... Just open <code>notepad &gt; Save As... &gt; Encoding</code> and select <code>UTF-8</code>. and you can then add the appropriate player names! I've tested this, and it works with Arena Chess and a few others...</p>
  
  <p>Hope this solves your problem. ~CSS</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-22T22:46:52.563Z
Answers.Text: I'm surprised that this is supposed to work in Arena. UTF-8 is the default encoding for all my plain text files, including PGN. When a PG file contains an `ü` Arena renders it as `Ã¼` (regardless whether I save the file as "UTF-8" or "UTF-8 without BOM"). Which Arena version are you using?
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T00:14:06.920Z
Answers.Text: @ChristopheStrobbe Arena 3.7.1 Alpha
Answers.UserDisplayName: cascading-style
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T10:31:38.730Z
Answers.Text: I'll update my own version of Arena (3.0 Build 2542) in the next few days and test my UTF-8 encoded PGN again.
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-27T17:37:32.260Z
Answers.Text: I now have Arena 3.5.1 build 2861 (20/12/2015), on Windows 7 (32 bits), and `ü` is still rendered as `Ã¼`.
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-30T12:46:24.117Z
Answers.Text: I have updated my question with a screenshot of how Arena 3.5.1 build 2861 displays non-ASCII characters. It clearly treats my UTF-8 file as Windows Codepage 1252.
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-07T18:06:34.850Z
Answers.Text: So, yes, [pgn4web games viewer](http://pgn4web.casaschi.net/viewer.php) supports UTF-8 and even supports Chinese characters. Thanks.
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-28T13:23:13.870Z
Answers.Text: Could you add a screenshot of Arena with my example PGN rendering correctly?
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-22T22:09:17.250Z
Answers.LastActivityDate: 2016-11-22T22:09:17.250Z
Answers.UserDisplayName: cascading-style
Answers.Body: <p>PGN databases created by ChessBase programs are encoded as UTF-8 by default, too.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T18:35:39.307Z
Answers.Text: Do you have an example of a UTF-8 encoded PGN file that uses non-ASCII characters? As long as you use only ASCII in such files, the UTF-8 encoding is irrelevant, as far as I know.
Answers.UserDisplayName: Tsundoku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T19:32:17.187Z
Answers.Text: https://ingram-braun.net/public/programming/web/testpages/chess-game-viewer/replay/
Answers.UserDisplayName: Archäopath
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T19:42:40.977Z
Answers.Text: Yes, I created a test file for pgn viewers embedded in web pages with German special characters. The above website (sorry, hit <ENTER> to early) shows the results. And I have no problems to type non-Latin characters in CB 14.
Answers.UserDisplayName: Archäopath
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T08:22:15.260Z
Answers.LastActivityDate: 2016-11-23T08:22:15.260Z
Answers.UserDisplayName: Archäopath
Body: <p>One of the <a href="https://zuttobenkyou.wordpress.com/2012/01/27/problems-with-the-portable-game-notation-pgn-standard/" rel="nofollow noreferrer">problems with PGN</a> is that it requires ASCII, while names of players often contain non-ASCII characters. (And of course, many names are not written in the Latin alphabet ...) </p>
  
  <p>The background to this question is the rendering of non-ASCII characters in Arena 3.5.1 (on Windows 7), as in the image below. The names for white and black are <code>Mittelsträß, Jürg</code> and <code>王, 玥</code>, respectively. Arena reads the UTF-8-encoded file as if it were encoded as <a href="https://en.wikipedia.org/wiki/Windows-1252" rel="nofollow noreferrer">Windows Codepage 1252</a>. Editors such as Notepad++, SublimeText and JEdit identify the file as UTF-8 (which is the default encoding of all my plain text files, anyway). </p>
  
  <p><a href="https://i.sstatic.net/oe6aX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oe6aX.png" alt="enter image description here"></a></p>
  
  <p>Here's an example PGN for testing:</p>
  
  <pre><code>[Event "Office Armageddon"]
  [Site "Böblingen GER"]
  [Date "??.??.??"]
  [Round "?"]
  [White "Mittelsträß, Jürg"]
  [Black "王, 玥"]
  [Result "*"]
  [SetUp "1"]
  [Mode "OTB"]
  [Termination "unterminated"]
  
  1. d2-d4 d7-d5 2. e2-e3 c7-c5 3. Bf1-b5+ Bc8-d7 4. a2-a4 Ng8-f6 5. d4xc5 e7-e5 6. b2-b4 Nb8-c6 7. Ng1-f3 Qd8-c7 8. Nb1-c3 a7-a6 9.  * 
  </code></pre>
  
  <p>(<a href="http://scidvspc.sourceforge.net/doc/Encoding.htm" rel="nofollow noreferrer">SCID</a> assumes a system encoding if a PGN is encoded in UTF-8 without a byte order mark (BOM), but the BOM makes no difference in Areana 3.5.1.)</p>
  
  <p>So I'd like to know if there is a <strong>Unicode-compatible alternative (ideally UTF-8)</strong> that is supported by some chess programs. (If not, PGN needs an overhaul.)</p>
  
Tags: <pgn>
Title: Is there a Unicode-compatible alternative to PGN?
ThreadText: # Is there a Unicode-compatible alternative to PGN?
  
  (Asked by: username_0 on 2016-11-22)
  
  One of the [problems with PGN](https://zuttobenkyou.wordpress.com/2012/01/27/problems-with-the-portable-game-notation-pgn-standard/) is that it requires ASCII, while names of players often contain non-ASCII characters. (And of course, many names are not written in the Latin alphabet ...)
  
  The background to this question is the rendering of non-ASCII characters in Arena 3.5.1 (on Windows 7), as in the image below. The names for white and black are `Mittelsträß, Jürg` and `王, 玥`, respectively. Arena reads the UTF-8-encoded file as if it were encoded as [Windows Codepage 1252](https://en.wikipedia.org/wiki/Windows-1252). Editors such as Notepad++, SublimeText and JEdit identify the file as UTF-8 (which is the default encoding of all my plain text files, anyway).
  
  [![enter image description here](https://i.sstatic.net/oe6aX.png)](https://i.sstatic.net/oe6aX.png)
  
  Here's an example PGN for testing:
  
  ```
  [Event "Office Armageddon"]
  [Site "Böblingen GER"]
  [Date "??.??.??"]
  [Round "?"]
  [White "Mittelsträß, Jürg"]
  [Black "王, 玥"]
  [Result "*"]
  [SetUp "1"]
  [Mode "OTB"]
  [Termination "unterminated"]
  
  1. d2-d4 d7-d5 2. e2-e3 c7-c5 3. Bf1-b5+ Bc8-d7 4. a2-a4 Ng8-f6 5. d4xc5 e7-e5 6. b2-b4 Nb8-c6 7. Ng1-f3 Qd8-c7 8. Nb1-c3 a7-a6 9.  * 
  
  ```
  
  ([SCID](http://scidvspc.sourceforge.net/doc/Encoding.htm) assumes a system encoding if a PGN is encoded in UTF-8 without a byte order mark (BOM), but the BOM makes no difference in Areana 3.5.1.)
  
  So I'd like to know if there is a **Unicode-compatible alternative (ideally UTF-8)** that is supported by some chess programs. (If not, PGN needs an overhaul.)
  
  **Tags:** pgn
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-11-22. Score: 2
  
  <https://sourceforge.net/p/pgn4web/wiki/PGN_Support/>
  
  if you read that, you will notice:
  
  [![Screenshot](https://i.sstatic.net/MkmBd.png)](https://i.sstatic.net/MkmBd.png)
  `in order for pgn4web to display those characters correctly, the PGN file should be saved in unicode UTF-8 format.`
  
  you *can* save PGN as UTF-8... Just open `notepad > Save As... > Encoding` and select `UTF-8`. and you can then add the appropriate player names! I've tested this, and it works with Arena Chess and a few others...
  
  Hope this solves your problem. ~CSS
  
  > **Comments:**
  > **username_0**: I'm surprised that this is supposed to work in Arena. UTF-8 is the default encoding for all my plain text files, including PGN. When a PG file contains an `ü` Arena renders it as `Ã¼` (regardless whether I save the file as "UTF-8" or "UTF-8 without BOM"). Which Arena version are you using?  
  > **username_1**: @ChristopheStrobbe Arena 3.7.1 Alpha  
  > **username_0**: I'll update my own version of Arena (3.0 Build 2542) in the next few days and test my UTF-8 encoded PGN again.  
  > **username_0**: I now have Arena 3.5.1 build 2861 (20/12/2015), on Windows 7 (32 bits), and `ü` is still rendered as `Ã¼`.  
  > **username_0**: I have updated my question with a screenshot of how Arena 3.5.1 build 2861 displays non-ASCII characters. It clearly treats my UTF-8 file as Windows Codepage 1252.  
  > **username_0**: So, yes, [pgn4web games viewer](http://pgn4web.casaschi.net/viewer.php) supports UTF-8 and even supports Chinese characters. Thanks.  
  > **username_0**: Could you add a screenshot of Arena with my example PGN rendering correctly?  
  
  ---
  
  ### Answer by username_2 on 2016-11-23. Score: 2
  
  PGN databases created by ChessBase programs are encoded as UTF-8 by default, too.
  
  > **Comments:**
  > **username_0**: Do you have an example of a UTF-8 encoded PGN file that uses non-ASCII characters? As long as you use only ASCII in such files, the UTF-8 encoding is irrelevant, as far as I know.  
  > **username_2**: https://ingram-braun.net/public/programming/web/testpages/chess-game-viewer/replay/  
  > **username_2**: Yes, I created a test file for pgn viewers embedded in web pages with German special characters. The above website (sorry, hit <ENTER> to early) shows the results. And I have no problems to type non-Latin characters in CB 14.  
  
  ---
  
  