1
0
mirror of synced 2024-11-27 21:10:48 +01:00

fixed japanese json encoding

This commit is contained in:
NotImplementedLife 2023-07-17 12:58:05 +03:00
parent 1ff7354141
commit 6b1008bfae
5 changed files with 19 additions and 3 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
bin/
obj/
*.user

10
Json.cs
View File

@ -1,4 +1,6 @@
using System.Text.Json; using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;
namespace TaikoSoundEditor namespace TaikoSoundEditor
{ {
@ -11,7 +13,11 @@ namespace TaikoSoundEditor
public static string Serialize<T>(T item) public static string Serialize<T>(T item)
{ {
return JsonSerializer.Serialize(item, new JsonSerializerOptions { WriteIndented = true }); return JsonSerializer.Serialize(item, new JsonSerializerOptions
{
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
WriteIndented = true
});
} }
} }

4
MainForm.Designer.cs generated
View File

@ -644,6 +644,8 @@
// //
// FeedbackBox // FeedbackBox
// //
this.FeedbackBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.FeedbackBox.Location = new System.Drawing.Point(6, 134); this.FeedbackBox.Location = new System.Drawing.Point(6, 134);
this.FeedbackBox.Multiline = true; this.FeedbackBox.Multiline = true;
this.FeedbackBox.Name = "FeedbackBox"; this.FeedbackBox.Name = "FeedbackBox";
@ -652,6 +654,7 @@
// //
// CreateBackButton // CreateBackButton
// //
this.CreateBackButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CreateBackButton.Location = new System.Drawing.Point(205, 102); this.CreateBackButton.Location = new System.Drawing.Point(205, 102);
this.CreateBackButton.Name = "CreateBackButton"; this.CreateBackButton.Name = "CreateBackButton";
this.CreateBackButton.Size = new System.Drawing.Size(75, 23); this.CreateBackButton.Size = new System.Drawing.Size(75, 23);
@ -662,6 +665,7 @@
// //
// CreateOkButton // CreateOkButton
// //
this.CreateOkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CreateOkButton.Location = new System.Drawing.Point(286, 102); this.CreateOkButton.Location = new System.Drawing.Point(286, 102);
this.CreateOkButton.Name = "CreateOkButton"; this.CreateOkButton.Name = "CreateOkButton";
this.CreateOkButton.Size = new System.Drawing.Size(75, 23); this.CreateOkButton.Size = new System.Drawing.Size(75, 23);

View File

@ -22,6 +22,9 @@ namespace TaikoSoundEditor
using var ms = new MemoryStream(); using var ms = new MemoryStream();
var header = Resources.song_ABCDEF_nus3bank.ToArray(); var header = Resources.song_ABCDEF_nus3bank.ToArray();
Write32(header, 0x4, (uint)idsp.Length);
for(int i=0;i<6;i++) for(int i=0;i<6;i++)
{ {
header[0xAA + i] = (byte)songId[i]; header[0xAA + i] = (byte)songId[i];

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<History>True|2023-07-17T08:15:26.2194507Z;</History> <History>True|2023-07-17T08:28:41.9554245Z;True|2023-07-17T11:15:26.2194507+03:00;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>