C
C#•4mo ago
just alex

encoding to ANSI

the source file is in ANSI, but the processed file gets written in UTF-8, I tried using Encoding.Default but it stays in UTF-8 and Encoding.GetEncoding(1252) does not really seem to work for me, how do I make final file be in ANSI Encoding? everything else works as I expect.
No description
8 Replies
Jimmacle
Jimmacle•4mo ago
what does "does not really seem to work" mean default is the system default encoding, not necessarily windows-1252
just alex
just alex•4mo ago
No description
Jimmacle
Jimmacle•4mo ago
Stack Overflow
C# method Encoding.GetEncoding won't find the windows-1252 encoding
i'm trying to get the windows-1252 encoding into a local variable like this: Encoding win1252 = Encoding.GetEncoding(1252); which results in an error saying that it can't find the codepage 1252. I've
Jimmacle
Jimmacle•4mo ago
first google result for "c# cp1252 not found"
just alex
just alex•4mo ago
thanks, i overlooked at it actually, i didnt know how to use NuGet to start with
jcotton42
jcotton42•4mo ago
Curious, why do you want ANSI in particular @just alex? There's little reason to use anything besides UTF-8 these days.
just alex
just alex•4mo ago
I am using halo toolkit mod tools and the tag editor only read ANSI since the dev version is from 2007
jcotton42
jcotton42•4mo ago
ah 💀
Want results from more Discord servers?
Add your server