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

Issue with windows encoding and expand vars #4519

Closed
mattdurham opened this issue Jul 19, 2023 · 5 comments · Fixed by #5515
Closed

Issue with windows encoding and expand vars #4519

mattdurham opened this issue Jul 19, 2023 · 5 comments · Fixed by #5515
Assignees
Labels
bug Something isn't working flow Related to Grafana Agent Flow frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. needs-attention An issue or PR has been sitting around and needs attention.

Comments

@mattdurham
Copy link
Collaborator

mattdurham commented Jul 19, 2023

What's wrong?

If using an encoding that is not windows 1252 on a file (lets say UTF-16E) when the agent tries to expand vars it seems to write a UTF8 string into UTF16. This gives an error.

The simplest solution would be to either convert to UTF8 beforehand or return an error if the file is not utf8 or windows 1252.

Steps to reproduce

TBD

System information

No response

Software version

No response

Configuration

No response

Logs

No response

@rfratto
Copy link
Member

rfratto commented Jul 21, 2023

Is this just for static mode?

@mattdurham mattdurham added the flow Related to Grafana Agent Flow label Jul 21, 2023
@mattdurham
Copy link
Collaborator Author

Tested and it affects both

@mattdurham
Copy link
Collaborator Author

Possibly due to injecting the environment variables into a byte stream without converting to UTF8.

@mattdurham mattdurham added this to the v0.38.0 milestone Jul 25, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. The issue will not be closed automatically, but a label will be added to it for tracking purposes.

If the opened issue is a bug, check if newer releases have fixed the issue. If the issue is no longer relevant, please feel free to close it.
Thank you for your contributions!

@github-actions github-actions bot added the stale Issue/PR mark as stale due lack of activity label Aug 30, 2023
@rfratto rfratto added needs-attention An issue or PR has been sitting around and needs attention. and removed stale Issue/PR mark as stale due lack of activity labels Sep 8, 2023
@mattdurham
Copy link
Collaborator Author

This might be able to be solved by using https://github.com/softlandia/cpd

@mattdurham mattdurham moved this from Todo to In Progress in Grafana Agent (Public) Oct 16, 2023
@mattdurham mattdurham self-assigned this Oct 16, 2023
@mattdurham mattdurham moved this from In Progress to Done in Grafana Agent (Public) Oct 17, 2023
@mattdurham mattdurham moved this from Done to In Progress in Grafana Agent (Public) Oct 17, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Grafana Agent (Public) Oct 17, 2023
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working flow Related to Grafana Agent Flow frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. needs-attention An issue or PR has been sitting around and needs attention.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants