Comments (2)
I had a similar issue. it's not really an issue with Hebrew or MWFeedParser. ynet encode their RSS feeds incorrectly. (They included a windows-1255 header, while the actual content is in UTF-8...)
Try:
NSData* encodedData;
// YNET FIX (wrong windows-1255 in header) (http://www.ynet.co.il)
if ([[_feed.url substringToIndex:21] isEqual:@"http://www.ynet.co.il"]) {
NSString *content = [[NSString alloc] initWithBytes:[response.data bytes]
length:[response.data length]
encoding: NSASCIIStringEncoding];
content = [content stringByReplacingOccurrencesOfString:@"Windows-1255" withString:@"UTF-8"];
encodedData = [content dataUsingEncoding:NSUTF8StringEncoding];
} else {
encodedData = response.data;
}
from mwfeedparser.
10x a lot :)
Benny
2012/2/1 Adar Porat <
[email protected]
I had a similar issue. it's not really an issue with Hebrew. ynet encode
their RSS feeds incorrectly. (They included a windows-1255 header, while
the actual content is in UTF-8)....Try:
// YNET FIX (wrong windows-1255 in header) (http://www.ynet.co.il) if ([[_feed.url substringToIndex:21] isEqual:@"http://www.ynet.co.il"]) { NSString *content = [[NSString alloc] initWithBytes:[response.data bytes] length:[response.data length] encoding: NSASCIIStringEncoding]; content = [content stringByReplacingOccurrencesOfString:@"Windows-1255" withString:@"UTF-8"]; encodedData = [content dataUsingEncoding:NSUTF8StringEncoding]; } else { encodedData = response.data; }
Reply to this email directly or view it on GitHub:
https://github.com/mwaterfall/MWFeedParser/issues/45#issuecomment-3762111
בני דוידוביץ
BDApps
מייסד ומתכנת
052-7790800
[email protected]
from mwfeedparser.
Related Issues (20)
- Why Weird Licence
- Enclosures does not contain all media content HOT 3
- Retrieving <wfw:commentRss> and <slash:comments>
- Can`t call delegate functions
- iOS 9 SSL Issues HOT 3
- How To parse Image (media:content) HOT 1
- How display image for different RSSfedd's Key. like (media:content , image, thumbnail)
- Problem with & HOT 1
- Atom parsing: MWFeedItem 'link' is null HOT 1
- Search with keyword.
- Impliment search option.
- Problem (and solution) handling 32bit unicode entities
- Current code is not working HOT 5
- exc_bad_access when dismissing MWFeedParser delegate
- create app with wordpress
- Support for IOS10?
- Error Domain=MWFeedParser Code=2 "A server with the specified hostname could not be found." UserInfo={NSLocalizedDescription=A server with the specified hostname could not be found.}
- Error parsing img tag (and possibly dates)
- Crash On iOS 8 / Xcode 6 - Beta 6
- Using MWFeedParser for parsing only HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mwfeedparser.