Griffintaur / News-At-Command-Line

:newspaper: News at the command line
MIT License
47 stars 53 forks source link

Error in codecs while printing article content #1

Closed Griffintaur closed 6 years ago

Griffintaur commented 7 years ago

There is some issue while printing output using different codecs.

vsingh0075 commented 7 years ago

Hi, I am totally a beginner here. I have read the code and I want to help. Can you please elaborate what codecs you are talking about ?

Griffintaur commented 7 years ago

The codec is basically an encoding used to represent characters.You might have heard of ASCII, UTF-8. These are the types of the encoding.You might receive some SMS in different languages on your phones and your phones might not be able to handle those languages, then what should be done in that case?

The problem is if we receive some text from websites requests where different encoding is used and now if we want to output the same text on the screen where different encoding is used, then there may be some inconsistency between the two different methods of encoding. what we want to do here.

  1. either check the encoding the output part and enforce the text before flushing to output to be in the same encoding and replace the characters where there is no matching with some predetermined characters? 2.make the output to be in sync with encoding used for the text.
vsingh0075 commented 7 years ago

Yeah, we should keep a standard encoding. I think we can use pyicu module to check the encoding of data fetched from News server and convert all the data to only say, UTF-8.

Griffintaur commented 7 years ago

Go ahead and try that out and submit a pull request if things go as per your plan. you can start by looking into the news pulling file where we get the downloaded html file Contact me for any help if needed.... Best wishes from my side

agiridharan commented 7 years ago

Hi if this issue still open? I would like to help if it is

Griffintaur commented 7 years ago

Yes, it is open. and if u want more description about the issue, you should check my comments in this thread

adisoundsgood commented 7 years ago

Hey! Is this issue still open? I'd like to help!

Griffintaur commented 7 years ago

@HungryAdi yes, it's still open. You can go for it

kalbhor commented 7 years ago

Hey, has this issue been resolved? If not, I'd like to help.

wflores96 commented 6 years ago

Not sure if this has been addressed yet and also not super familiar with encoding or requests, but I took a crack at it and submitted a PR #17