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

page.raw_data not get converted to utf-8 #5

Closed
buger opened this issue Mar 3, 2015 · 10 comments
Closed

page.raw_data not get converted to utf-8 #5

buger opened this issue Mar 3, 2015 · 10 comments
Milestone

Comments

@buger
Copy link

buger commented Mar 3, 2015

After switching to rugged adapter i started getting incompatible character encodings: ASCII-8BIT and UTF-8 errors and found that page.raw_data is returned in ASCII-8BIT encoding (was utf-8 using grit). I guess this should be converted inside adapter.

@buger buger changed the title raw_data not converted to utf-8 page.raw_data not get converted to utf-8 Mar 3, 2015
@dometto
Copy link
Member

dometto commented Apr 27, 2015

Thanks @buger, we'll be sure to address this before the first non-beta release.

@bartkamphorst bartkamphorst added this to the 0.4.2 milestone Dec 3, 2015
@bartkamphorst
Copy link
Member

The ASCII-8BIT encoding is set on purpose in rugged "since Git is encoding agnostic". See here. It would seem that in some instances page#text_data (see here) would be preferable over page#raw_data. @buger Do you recall which call to page.raw_data was giving you trouble?

@dometto
Copy link
Member

dometto commented Dec 27, 2015

It does seem to me like this shoud be handled by replacing #raw_data calls in gollum-lib to #text_data calls. It seems ok that the adapter just returns blob contents in ASCII-8. Should we close this and open a gollum-lib issue, @bartkamphorst?

@dometto
Copy link
Member

dometto commented Dec 27, 2015

Hmm, on second thought, it seems like and gollum and gollum-lib already use text_data when it comes to displaying the contents of a page. raw_data is used when showing the contents of a non-page file (which is arguably good), and in the following places:

Not sure if it should be changed in any of those places.

@bartkamphorst
Copy link
Member

Exactly. Which is why I wanted to know which call specifically was causing trouble. :)

@dometto
Copy link
Member

dometto commented Dec 27, 2015

Agree. Ping @buger, can you help us reproduce your issue/point to the raw_data call in question?

@buger
Copy link
Author

buger commented Dec 28, 2015

sure, I'll try to re-create test case

@bartkamphorst
Copy link
Member

@buger Any luck re-creating a test case?

@buger
Copy link
Author

buger commented Sep 4, 2016

Sorry, but I'm not working on this project anymore

On Wednesday, 31 August 2016, Bart Kamphorst <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

@buger https://github.com/buger Any luck re-creating a test case?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA2uVsap43KX2JU94DTZKlz0msbiOYRks5qldQDgaJpZM4DoumK
.


https://goreplay.org - test your system with real data
@buger https://twitter.com/buger - me on twitter

@dometto
Copy link
Member

dometto commented Oct 17, 2018

This should be resolved in 5.x, at least utf-8 contents are displaying fine. Closing because of no further info on how to reproduce.

@dometto dometto closed this as completed Oct 17, 2018
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

No branches or pull requests

3 participants