保留中文原始字符

This commit is contained in:
milimoe 2024-04-12 15:06:52 +08:00
parent 0391f4f045
commit 1f39603039
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
6 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>

View File

@ -1,6 +1,8 @@
using System.Collections; using System.Collections;
using System.Text.Encodings.Web;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using System.Text.Unicode;
using Milimoe.FunGame.Core.Library.Common.JsonConverter; using Milimoe.FunGame.Core.Library.Common.JsonConverter;
using Milimoe.FunGame.Core.Library.Common.Network; using Milimoe.FunGame.Core.Library.Common.Network;
@ -14,6 +16,7 @@ namespace Milimoe.FunGame.Core.Service
private readonly static JsonSerializerOptions GeneralOptions = new() private readonly static JsonSerializerOptions GeneralOptions = new()
{ {
WriteIndented = true, WriteIndented = true,
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All),
ReferenceHandler = ReferenceHandler.IgnoreCycles, ReferenceHandler = ReferenceHandler.IgnoreCycles,
Converters = { new DateTimeConverter(), new DataTableConverter(), new DataSetConverter(), new UserConverter(), new RoomConverter() } Converters = { new DateTimeConverter(), new DataTableConverter(), new DataSetConverter(), new UserConverter(), new RoomConverter() }
}; };

View File

@ -1,5 +1,4 @@
@echo off @echo off
call cd src
call dotnet clean call dotnet clean
call dotnet build -c Release -r linux-x64 call dotnet build -c Release -r linux-x64
pause pause

View File

@ -1,5 +1,4 @@
@echo off @echo off
call cd src
call dotnet clean call dotnet clean
call dotnet build -c Release -r win-x64 call dotnet build -c Release -r win-x64
pause pause

View File

@ -1,5 +1,4 @@
@echo off @echo off
call cd src
call dotnet clean call dotnet clean
call dotnet publish -c Release -r linux-x64 call dotnet publish -c Release -r linux-x64
pause pause

View File

@ -1,5 +1,4 @@
@echo off @echo off
call cd src
call dotnet clean call dotnet clean
call dotnet publish -c Release -r win-x64 call dotnet publish -c Release -r win-x64
pause pause