Permalink
Browse files

Fix to import URLs of pages that contain non-ascii characters properly

  • Loading branch information...
1 parent 738f959 commit 479404aaa5c4341db281e50caaf34f24c8c4e83f @shurain shurain committed Jul 25, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 AlienNoteImporter.m
  2. +1 −1 readability/readability.py
View
@@ -579,7 +579,7 @@ - (NSString *) markdownFromSource: (NSString *)htmlString
[task launch];
- [writeHandle writeData: [htmlString dataUsingEncoding: NSASCIIStringEncoding]];
+ [writeHandle writeData: [htmlString dataUsingEncoding: NSUTF8StringEncoding]];
[writeHandle closeFile];
NSMutableData *data = [[NSMutableData alloc] init];
@@ -593,7 +593,7 @@ - (NSString *) markdownFromSource: (NSString *)htmlString
NSString *strippedString;
strippedString = [[NSString alloc]
initWithData: data
- encoding: NSASCIIStringEncoding];
+ encoding: NSUTF8StringEncoding];
[task release];
[data release];
@@ -335,7 +335,7 @@ def main():
else:
file = open(args[0])
try:
- print Document(file.read(), debug=options.verbose).summary().encode('ascii','ignore')
+ print Document(file.read(), debug=options.verbose).summary().encode('utf-8','ignore')
finally:
file.close()

0 comments on commit 479404a

Please sign in to comment.