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

feat(stdlib): add encode_charset, decode_charset functions #1162

Merged
merged 5 commits into from
Dec 10, 2024

Conversation

powerumc
Copy link
Contributor

@powerumc powerumc commented Dec 3, 2024

Summary

Charset encoding and decoding functions were implemented to integrate the charset settings used in various operating systems and systems with vector.

  • decode_charset(value, from_charset)
  • encode_charset(value, to_charset)

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on
    our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Checklist

PR adding new VRL function:

PR adding documentation:

References

Charset encoding and decoding functions were implemented to integrate the charset settings used in various operating systems and systems with vector.

- decode_charset(value, from_charset)
- encode_charset(value, to_charset)
Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

Thank you @powerumc!

Left a couple of minor comments.

src/stdlib/decode_charset.rs Outdated Show resolved Hide resolved
src/stdlib/encode_charset.rs Outdated Show resolved Hide resolved
- rename `error` function to `create_error`
- rename `from` to `from_charset` in decode_charset
- rename `from` to `to_charset` in encode_charset
@powerumc
Copy link
Contributor Author

powerumc commented Dec 7, 2024

@pront
I submitted a sibling PR in Vector to document the new function. vectordotdev/vector #21981
Thank you for your review. 😊

@pront pront enabled auto-merge December 9, 2024 16:20
@pront
Copy link
Member

pront commented Dec 9, 2024

The licenses check fails, please use dd-rust-license-tool write && git commit -am "dd-rust-license-tool write" and push to fix.

@powerumc
Copy link
Contributor Author

The licenses check fails, please use dd-rust-license-tool write && git commit -am "dd-rust-license-tool write" and push to fix.

In my case, there is no change in the dd-rust-license-tool write and commit -am "dd-rust-license-tool write" command.
the check-licenses step in GitHub Actions was successful.

The error occurs in the check-deny step. Is this caused by my code?
https://github.com/vectordotdev/vrl/actions/runs/12160810717/job/34141068366?pr=1162

@jszwedko
Copy link
Member

I think we just needed main merged in to fix the cargo deny failure. I merged it here.

@pront pront added this pull request to the merge queue Dec 10, 2024
Merged via the queue into vectordotdev:main with commit ddcb49e Dec 10, 2024
14 checks passed
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.

feat(stdlib): Function for Converting Character Encodings
3 participants