PeWu / topola-viewer

Topola Genealogy Viewer – interactive genealogy visualization
https://pewu.github.io/topola-viewer
Apache License 2.0
221 stars 56 forks source link

special characters #170

Closed n8craig closed 9 months ago

n8craig commented 9 months ago

How does one address special characters like ñ and à? I have an instance loaded with a file from a URL but the ñ character is represented as a replacement character (see first image below). I see from the Skłodowska example that special characters are possible. If I replace an ñ with unicode U+00F1 it just shows the unicode rather than rendering the character (see second image). Therefore, I am unsure how to implement special characters. Any guidance would be much appreciated.

image

image

PeWu commented 9 months ago

I'm not sure why sometimes unicode characters are messed up. Can you check if your GEDCOM file has a 1 CHAR UTF-8 header and add it if it's not there?

n8craig commented 9 months ago

Thank you for the suggestion. I found a line that read 1 CHAR ANSI, changed it to read 1 CHAR UTF-8, and reloaded the file. I tried in two different browsers, but the result was no change I still get the same replacement character. Any other things to try?

PeWu commented 9 months ago

Make sure the file is actually UTF-8 encoded. Maybe since you had ANSI originally, your file is not actually UTF-8. There are various ways of checking it, see https://www.google.com/search?q=check+if+file+is+utf-8 Using a text editor, you may be able to "Save As" using a specific encoding (UTF-8). Topola Viewer does not support any other encoding than UTF-8.

n8craig commented 9 months ago

That was the issue. I opened the .ged file in Notepad++ and clicked Encoding > Convert to UTF-8. Then I changed 1 CHAR ANSI to 1 CHAR UTF-8, saved the file, reloaded the file in Topola, and the special characters render properly. Thanks for helping to diagnose the issue, which was at my end with the file.