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

UTF-8 of submit requests wrongly displayed #8349

Open
jengelh opened this issue Sep 13, 2019 · 7 comments
Open

UTF-8 of submit requests wrongly displayed #8349

jengelh opened this issue Sep 13, 2019 · 7 comments
Labels
Backend Things regarding the OBS backend Bug Frontend Things related to the OBS RoR app

Comments

@jengelh
Copy link
Contributor

jengelh commented Sep 13, 2019

Observed behavior

https://build.opensuse.org/request/show/730703
obs

Expected Result

Like osc rdiff -r49:50 devel:languages:perl/perl-Cpanel-JSON-XS|grep --text 10204:
exp

@dmarcoux dmarcoux added Bug Frontend Things related to the OBS RoR app labels Sep 16, 2019
@marcus-h
Copy link
Member

marcus-h commented Sep 18, 2019 via email

@hennevogel
Copy link
Member

API only passes through diffs, so this might be a problem generating them in the backend.

@hennevogel hennevogel added Backend Things regarding the OBS backend and removed Frontend Things related to the OBS RoR app labels Sep 19, 2019
@mlschroe
Copy link
Member

Maybe, maybe not. Try this:

$ osc api '/request/730703?cmd=diff' -X POST
$ osc api '/source/devel:languages:perl/perl-Cpanel-JSON-XS?cmd=diff&expand=1&filelimit=10000&opackage=perl-Cpanel-JSON-XS&oproject=openSUSE%3AFactory&rev=50&tarlimit=10000' -X POST

@mlschroe mlschroe added Frontend Things related to the OBS RoR app Backend Things regarding the OBS backend and removed Backend Things regarding the OBS backend labels Sep 19, 2019
@mlschroe
Copy link
Member

OTOH view=xml does seem to do something wrong in the backend. So I'll add the backend label again but also keep the frontend label...

Both the backend and the frontend seem to trip over the string containing a bad UTF8 char and then doing latin1->utf8 encoding.

@perlpunk
Copy link
Contributor

I tried to reproduce it but failed. This looks like expected:
obs-request-utf8

@perlpunk
Copy link
Contributor

Also tried to insert the wrong text first. Looks also ok:
obs-request-utf8-2

@perlpunk
Copy link
Contributor

Seems the problem was that the original file encoding was latin1. Reproduced (the other way round) by converting utf8 to latin1:

obs-request-utf8-3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend Bug Frontend Things related to the OBS RoR app
Projects
None yet
Development

No branches or pull requests

6 participants