GithubHelp home page GithubHelp logo

itemprinterdegacha's People

Contributors

bl4cksh4rk avatar easyworld avatar kwsch avatar legofigure11 avatar yatsuna827 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

itemprinterdegacha's Issues

UI does not handle display scaling correctly

I have my main display set to 125% scale which makes some UI elements start overlapping or otherwise hard to read.

I would fix this myself, but C# is not my strong suit and I'm not sure how to use WinForms either.

ApplicationFrameHost_U2eZukocnW
ApplicationFrameHost_b0cwpbyEBc

UTF-8 Character Encoding Issues in .NET Resource Files

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:

  1. Add lang_zh.txt with UTF-8 encoding to the Resources in a .NET project.
  2. Use the Properties.Resources.ResourceManager.GetObject("lang_zh") method to read the content of lang_zh.txt.
  3. Observe that the returned object, when converted to a string, displays Chinese characters as garbled text.
  4. Change the encoding of lang_zh.txt to UTF-16 LE and update the resource file.
  5. Repeat step 2 and observe that the Chinese characters are now displayed correctly.

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.

Screenshots
with utf8
image
with-utf8

with utf16le
image
with-utf16le

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.