From d4fe161c6a8588f30e83b45af9390921ec9a1dda Mon Sep 17 00:00:00 2001 From: nikvoid <77514082+nikvoid@users.noreply.github.com> Date: Thu, 30 Jan 2025 23:10:18 +0200 Subject: [PATCH] use UTF-8 encoding for control NCA Name and Author --- Brew.NET/NACP.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Brew.NET/NACP.cs b/Brew.NET/NACP.cs index 358c21a..8259eda 100644 --- a/Brew.NET/NACP.cs +++ b/Brew.NET/NACP.cs @@ -57,9 +57,9 @@ public NACP(string Path) { long titleoff = (i * 0x300); r.BaseStream.Seek(titleoff, SeekOrigin.Begin); - string name = Encoding.ASCII.GetString(r.ReadBytes(0x200)); + string name = Encoding.UTF8.GetString(r.ReadBytes(0x200)); r.BaseStream.Seek(titleoff + 0x200, SeekOrigin.Begin); - string author = Encoding.ASCII.GetString(r.ReadBytes(0x100)); + string author = Encoding.UTF8.GetString(r.ReadBytes(0x100)); Entries.Add(new NACPEntry() { Name = name, @@ -87,14 +87,14 @@ public void generate(string Out) int psize = pcode.Count; foreach(NACPEntry ent in Entries) { - List name = new List(Encoding.ASCII.GetBytes(ent.Name)); + List name = new List(Encoding.UTF8.GetBytes(ent.Name)); int size = name.Count; while(size < 0x200) { name.Add(0); size = name.Count; } - List author = new List(Encoding.ASCII.GetBytes(ent.Author)); + List author = new List(Encoding.UTF8.GetBytes(ent.Author)); size = author.Count; while(size < 0x100) {