Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new function to allow keeping the flags original case #35

Open
wants to merge 1 commit into
base: FRAMEWORK_6_0
Choose a base branch
from

Conversation

Barry3D
Copy link

@Barry3D Barry3D commented Oct 8, 2024

According to RFC 9051 "Servers MAY permit the client to define new
keywords in the mailbox".

For my use-case this makes it necessary that I change the encoding of
keywords from UTF-8 to UTF7-IMAP to allow Umlauts in keywords.

Example: "Bööm" will be encoded as "B&APYA9g-m"

If I insert the lowercase Version of this string into
mb_convert_encoding(), I receive a different result ("b??m").

Therefore I propose a method that allows us to fetch keywords in their
original case to prevent encoding from becoming corrupted.

I created a patch that simply adds a new method to fetch flags, that
hopefully has no impact on the existing code. The constant I added for
flags with their original case is currently 999 since I don't know if
you're simply counting up or if the values of the constants have a
system.

Copy link

what-the-diff bot commented Oct 8, 2024

PR Summary

  • Introduction of a New Constant
    A new constant, FETCH_FLAGS_ORIGINAL_CASE, has been established with a designated value of 999 to enhance our system's functionality.

  • Updating Method to Store Original IMAP Flags
    The setFlags method in our code has been updated. It now makes use of this new constant to store the original case of IMAP flags, improving our system's ability to retain essential details.

  • New Method for Retrieving Flag Information
    A fresh method, getFlagsOriginalCase(), has been introduced. This method retrieves IMAP flags while maintaining their original capitalization. This has the potential to enhance reliability when handling these flags in the future.

@Barry3D Barry3D closed this Oct 8, 2024
@Barry3D Barry3D deleted the 75241-add-alternative-for-flag-fetching branch October 8, 2024 06:01
@Barry3D Barry3D restored the 75241-add-alternative-for-flag-fetching branch October 8, 2024 06:02
@Barry3D Barry3D reopened this Oct 8, 2024
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.

1 participant