-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allowed forced reading of files as UTF-8 #8
Comments
Do you have sample files / outputs / pseudocode? On 3 December 2013 11:23, Ross Jones notifications@github.com wrote:
Love regards etc David Miller |
So problem is: If you use open().read() and you read a file that has an accented character in it (says a þ) then it comes out as \x634234 because read() only reads ascii. import codecs And then .read() returns a unicode. Also, this email is the test file. R On 5 Dec 2013, at 18:24, David Miller notifications@github.com wrote:
|
I get fed up of having to use codecs.open() and the fliddling about between ascii, 8859-1 and utf-8 just to read a text file into a unicode. 99% of what I get is one of ['utf-8', 'latin1', 'ascii']. All I ever want is 'utf-8'.
Would be really nice if FFS handled all of this so I could open a file and know that whatever I read is utf-8/unicode sans faff.
The text was updated successfully, but these errors were encountered: