Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Raws encoding  (Read 361 times)

DeadlyLintRoller

  • Bay Watcher
    • View Profile
Raws encoding
« on: December 29, 2022, 01:23:50 pm »

Hello, I've resurrected my old account here to cross post a question I posted on Reddit, and apologies for the crosspost, but it went two days without a reply.

https://www.reddit.com/r/DwarfFortressModding/comments/zwqzgl/raws_character_encoding/

Basically, I'm trying to figure out how to properly handle encoding of special characters in the raws. I just see the unicode question mark ("�") by default. I understand that the raws should be using CP437, or Windows-1252 encoding, but when I use visual studio code, and set those, it doesn't look right either (see the reddit post for those results).

I am using Ubuntu, so that just may be my problem. I've seen similar issues with Mac before.  I'm also still looking at 40.07.

I'm really just messing around to try to add classic Tolkien Dwarf character names into my language files.

Edit: I figured out the problem, and updated the reddit post. The issue was that I had previously opened and saved the file in the incorrect encoding, saving the unicode characters. I only realized this when I noticed that all the incorrectly encoded characters were the same, and started looking at the language_ELF.txt file for comparison, and the characters appeared differently. Those pesky elves are good for something I guess.

Reverting the language_DWARF.txt file to a fresh version, and then setting the encoding to CP 437 immediately upon opening it resolved the issue and allowed me to see the proper characters in my editor.
« Last Edit: December 30, 2022, 09:17:51 am by DeadlyLintRoller »
Logged
I'm back!