otsaloma / nfoview

Viewer for NFO files
https://otsaloma.io/nfoview
GNU General Public License v3.0
139 stars 13 forks source link

Extended ASCII (ISO/IEC 8859-1 / CP819) support #20

Closed ThurahT closed 3 years ago

ThurahT commented 3 years ago

Thanks for an awesome .NFO/.DIZ viewer! I use it everyday and reminisce about old times. Do you plan to add extended ASCII as a possible enhancement someday?

otsaloma commented 3 years ago

I'm not really familiar with that. If there's a reliable way to detect the encoding based on the file contents, then it might make sense to add.

ThurahT commented 3 years ago

I figured it could be added as a manual option in settings only. I made a bad mockup: https://i.imgur.com/1Hc4S3s.png In the shot you can also see the missing charcaters in some of the tracks name. That NFO is encoded in 8859-1 / CP 819.

As far as I understand CP 819 only adds some european characters like Swedish åäö and Norwegian and Danish equvilants plus some others. The block and lines art charcaters are preserved.

Found a picture: https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Latin-1-infobox.svg/1280px-Latin-1-infobox.svg.png

ThurahT commented 3 years ago

I think my statement above is incorrect. What I read before on wikipedia can't be correct either (or I read it incorrectly). I used another file viewer and changing code page will break the ASCII art. So, I suspect the wiki page must have referred to ANSI art or something else. Not high ASCII art made up of those blocks and lines.

The other NFO viewer I saw must have made some internal magic to do a mash up of CP 437 and CP 819 to display block and line art correctly, as well as the characters from extended ASCII.

Sorry for the confusion. I'll read up on better sources before making an issue and post again. I am still confused though and I'll make this my weekend's read material.

EDIT: So, codelobe had the facts straight: http://codelobe.com/ He even built a converter. I used it to convert to UTF8 and then back to CP 437 and then I saved one as CP 819 and I got these result from that excercise: working Swedish characters with working ASCII art: https://i.imgur.com/0k7GNqi.png as compared to before: https://i.imgur.com/QGEe6E1.png Shots printed by NFO Viewer, I just edited out the PII or rather group info since they hate the web.

I guess that other NFO viewer I remember did all this internally somehow. Or that NFO file was coded the way I made this one just now.

Thanks again for a great NFO viewer!