kwsch / itemprinterdegacha Goto Github PK
View Code? Open in Web Editor NEWCalculation tool for Scarlet/Violet's Item Printer
License: GNU General Public License v3.0
Calculation tool for Scarlet/Violet's Item Printer
License: GNU General Public License v3.0
Describe the bug
When using Properties.Resources.ResourceManager.GetObject(s)
in ResourceUtil to retrieve a UTF-8 encoded text file named lang_zh.txt
that contains Chinese characters, the text is returned with garbled characters (δΉ±η ). However, changing the encoding of lang_zh.txt
to UTF-16 LE (Little Endian) results in the text being read correctly without any character corruption.
To Reproduce
Steps to reproduce the behavior:
lang_zh.txt
with UTF-8 encoding to the Resources in a .NET project.Properties.Resources.ResourceManager.GetObject("lang_zh")
method to read the content of lang_zh.txt
.lang_zh.txt
to UTF-16 LE and update the resource file.Expected behavior
The expectation is that ResourceManager.GetObject
should read the content of the UTF-8 encoded lang_zh.txt
file and correctly display the Chinese characters without any issues, just as it does when the file is encoded in UTF-16 LE.
Additional context
This behavior suggests that the ResourceManager
is defaulting to a UTF-16 encoding when retrieving the text file, causing issues with files encoded in UTF-8. This could potentially lead to problems in applications that depend on UTF-8 encoding for their resources. A possible workaround would involve reading the resource as a byte array and then manually decoding it using UTF-8 encoding. However, this adds additional steps and complexity to resource management.
Downloading artifacts from Github actions requires signing in to Github, but this limitation is a hurdle for those who just want to use this application.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.