Skip to content

Conversation

Shane32
Copy link
Contributor

@Shane32 Shane32 commented May 2, 2024

Closes #513

@Shane32 Shane32 changed the title Fix character encoding when EciMode is specified [WIP] Fix character encoding when EciMode is specified May 3, 2024
var bytes = Encoding.GetEncoding("ISO-8859-1").GetBytes(input);
var result = Encoding.GetEncoding("ISO-8859-1").GetString(bytes);
return String.Equals(input, result);
return encoding == EncodingMode.Byte ? (codedText.Length / 8) : plainText.Length;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return encoding == EncodingMode.Byte ? (codedText.Length / 8) : plainText.Length;
return encoding == EncodingMode.Byte ? (int)((uint)codedText.Length / 8) : plainText.Length;

do we care about such things here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes; we certainly can optimize this PR also.

I need to come back to this PR; but for now I was leaving it alone until I'm finished with performance PRs.

@codebude
Copy link
Owner

Hi @Shane32 ,

since QRCoder will reach its end of life and the repository will be archived on November 1st, 2025, I’d like to clarify how to proceed with this PR.

Would you prefer me to merge it before the archival, or should I close it instead?
Please let me know what you think – I want to handle your contribution in the way that feels most appropriate to you.

Thanks again for your effort and contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What is the purpose of forceUtf8?
3 participants