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

Wrong error message encoding #624

Closed
xiazeyu opened this issue May 4, 2022 · 6 comments · Fixed by #636
Closed

Wrong error message encoding #624

xiazeyu opened this issue May 4, 2022 · 6 comments · Fixed by #636

Comments

@xiazeyu
Copy link
Contributor

xiazeyu commented May 4, 2022

In plugin page,
When error occurs, it gives error with wrong encoding:
image
And the wrong encoding seems originates from the backend
image

I believe
https://github.com/Difegue/LANraragi/blob/dev/lib/LANraragi/Plugin/Metadata/Eze.pm#L78
is where this problem happens. Maybe it is due to its way to process Unicode.
Is there any way to check the way it passes path? It seems that other messages like "deleting the archive" also gives wrong path encoding.

off-topic:
Please have a look at #620 (comment) in case you missed it.

@xiazeyu
Copy link
Contributor Author

xiazeyu commented May 4, 2022

And this also occurs in the logs page.
image

@Difegue
Copy link
Owner

Difegue commented May 4, 2022

Thanks, I'll take a look.
Could I convince you to look at #618 in the meantime ? 😁

@xiazeyu
Copy link
Contributor Author

xiazeyu commented May 4, 2022

sry, forgot about it. I'll see that later.

@xiazeyu
Copy link
Contributor Author

xiazeyu commented Jun 11, 2022

@Difegue

Sorry but this issue seems more general.
Places like:
https://github.com/Difegue/LANraragi/blob/dev/lib/LANraragi/Plugin/Metadata/Eze.pm#L78
And https://github.com/Difegue/LANraragi/blob/dev/lib/LANraragi/Utils/Database.pm#L206-L220

havn't got fixed. And it seems that are lots of similar encoding problems related to filename just like the PR mentioned.

Also I don't know if there's a indentation at the begining of this line.
https://github.com/Difegue/LANraragi/pull/636/files#diff-a8db8756fe18689d50fa8d474003e0122b6b5099e8101ba8f99632055fb507a0R307

@Difegue
Copy link
Owner

Difegue commented Jun 11, 2022

It's likely that the error occurs in logging in various parts of the app since redis_decode needs to be called manually - - It might be better to change the logger directly to have it decode by default.

@Difegue
Copy link
Owner

Difegue commented Jun 16, 2022

👍 Generalized to all logging, hopefully this'll fix display issues for good (in logs at least 🥲)

@Difegue Difegue closed this as completed Jun 16, 2022
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 a pull request may close this issue.

2 participants