Closed
Bug 337451
Opened 18 years ago
Closed 18 years ago
better charset support (feed preview)
Categories
(Firefox Graveyard :: RSS Discovery and Preview, defect)
Firefox Graveyard
RSS Discovery and Preview
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 2 beta1
People
(Reporter: ria.klaassen, Assigned: sayrer)
References
Details
(Keywords: fixed1.8.1, intl, Whiteboard: [swag: 0d])
Attachments
(4 files, 3 obsolete files)
When I look at this feed: http://planet.mozilla.org/rss20.xml , mr Smedberg seems to say weird things, so I want to change the encoding but the page doesn't react. When I run in in the old pretty print in Firefox 1.5.3 however, I see the right text: It’s not Bias, It’s Discrimination.
Reporter | ||
Comment 1•18 years ago
|
||
Reporter | ||
Comment 2•18 years ago
|
||
This becomes really ugly when you set a minimum font-size of 14 in Options > Content > Fonts & Colors > Advanced.
Reporter | ||
Comment 3•18 years ago
|
||
(In reply to comment #2) > Created an attachment (id=221684) [edit] > minimum font-size set to 14 > > This becomes really ugly when you set a minimum font-size of 14 in Options > > Content > Fonts & Colors > Advanced. > Sorry, posted in the wrong bug :(
Assignee | ||
Comment 4•18 years ago
|
||
http://benjamin.smedbergs.us/blog/feed/ wfm. planet has encoding problems. Not sure changing the encoding will help here, since the feed preview will always be utf-8.
Reporter | ||
Updated•18 years ago
|
Attachment #221684 -
Attachment is obsolete: true
Reporter | ||
Comment 5•18 years ago
|
||
This piece of French text looks alien. A big part of the words look like curses. Sounds very weird to me if this can't be solved.
Comment 6•18 years ago
|
||
Well, there's "can't be solved" and then there's "that's not the way to solve it." Filed bug 339409 against planet.m.o, which is sending UTF-8 as text/xml with no charset param and no encoding in the XML decl, probably the very worst possible way to send XML. Rob, am I guessing right from our mangled characters, that we're using ISO-8859-1 as a default in the absence of a charset? That doesn't seem like a very happy choice, if we can avoid it.
Assignee | ||
Comment 7•18 years ago
|
||
(In reply to comment #6) > > Rob, am I guessing right from our mangled characters, that we're using > ISO-8859-1 as a default in the absence of a charset? That doesn't seem like a > very happy choice, if we can avoid it. I suspect we are sniffing it, as there are cp-1252 characters near the beginning. http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fplanet.mozilla.org%2Frss20.xml I will try that feed with those chars edited out.
Assignee | ||
Comment 8•18 years ago
|
||
Assignee | ||
Comment 9•18 years ago
|
||
OK, planet is totally busted, but we can do better.
Assignee: nobody → sayrer
Summary: Can't change the encoding of the feed → better UTF-1252 support
Reporter | ||
Updated•18 years ago
|
Summary: better UTF-1252 support → better UTF-1252 support (feed preview)
Assignee | ||
Comment 10•18 years ago
|
||
> Rob, am I guessing right from our mangled characters, that we're using
> ISO-8859-1 as a default in the absence of a charset?
Phil wins. That's exactly what was happening, if I understand nsParser. This patch will silently drop the 1252 characters (there were only a few), just like our view-source view does (fair enough, they are control characters in utf-8).
Attachment #223568 -
Flags: superreview?(peterv)
Attachment #223568 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Attachment #223568 -
Flags: review? → review?(dbaron)
Assignee | ||
Updated•18 years ago
|
Flags: blocking-firefox2?
Assignee | ||
Updated•18 years ago
|
Summary: better UTF-1252 support (feed preview) → better charset support (feed preview)
Assignee | ||
Updated•18 years ago
|
Attachment #223568 -
Flags: review?(dbaron) → review?(bugmail)
Comment on attachment 223568 [details] [diff] [review] Use TryDocumentCharset the way nsXMLDocument does >Index: parser/xml/src/nsSAXXMLReader.cpp > nsSAXXMLReader::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) > { > NS_ENSURE_TRUE(mIsAsyncParse, NS_ERROR_FAILURE); >- nsresult rv = InitParser(mParserObserver); >+ nsresult rv; >+ nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest); >+ if (channel) >+ rv = InitParser(mParserObserver, channel); >+ else >+ rv = InitParser(mParserObserver, nsnull); This looks a lot like just doing |rv = InitParser(mParserObserver, channel);| always :) >+nsSAXXMLReader::TryChannelCharset(nsIChannel *aChannel, >+ PRInt32& aCharsetSource, >+ nsACString& aCharset) >+{ >+ if (kCharsetFromChannel <= aCharsetSource) { Please switch these two around, that makes it easier to read IMHO. With both those fixed, r=me
Attachment #223568 -
Flags: review?(bugmail) → review+
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Assignee | ||
Comment 12•18 years ago
|
||
Attachment #223568 -
Attachment is obsolete: true
Attachment #224378 -
Flags: superreview?(peterv)
Attachment #224378 -
Flags: approval-branch-1.8.1?(peterv)
Attachment #223568 -
Flags: superreview?(peterv)
Comment 13•18 years ago
|
||
Comment on attachment 224378 [details] [diff] [review] address comments from sicking >+// from nsDocument.cpp Too bad we can't share this :-(. >+nsSAXXMLReader::TryChannelCharset(nsIChannel *aChannel, >+ rv = calias->GetPreferred(charsetVal, >+ preferred); This can go on one line.
Attachment #224378 -
Flags: superreview?(peterv)
Attachment #224378 -
Flags: superreview+
Attachment #224378 -
Flags: approval-branch-1.8.1?(peterv)
Attachment #224378 -
Flags: approval-branch-1.8.1+
Assignee | ||
Comment 14•18 years ago
|
||
Checked in on trunk. Checking in parser/xml/src/Makefile.in; /cvsroot/mozilla/parser/xml/src/Makefile.in,v <-- Makefile.in new revision: 1.3; previous revision: 1.2 done Checking in parser/xml/src/nsSAXXMLReader.h; /cvsroot/mozilla/parser/xml/src/nsSAXXMLReader.h,v <-- nsSAXXMLReader.h new revision: 1.3; previous revision: 1.2 done /cvsroot/mozilla/parser/xml/src/nsSAXXMLReader.cpp,v <-- nsSAXXMLReader.cpp new revision: 1.7; previous revision: 1.6 done
Assignee | ||
Updated•18 years ago
|
Whiteboard: [swag: 0d]
Assignee | ||
Updated•18 years ago
|
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox 2 beta1
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 15•18 years ago
|
||
Attachment #224378 -
Attachment is obsolete: true
Assignee | ||
Comment 16•18 years ago
|
||
Checking in parser/xml/src/Makefile.in; /cvsroot/mozilla/parser/xml/src/Makefile.in,v <-- Makefile.in new revision: 1.2.2.3; previous revision: 1.2.2.2 done Checking in parser/xml/src/nsSAXXMLReader.cpp; /cvsroot/mozilla/parser/xml/src/nsSAXXMLReader.cpp,v <-- nsSAXXMLReader.cpp new revision: 1.6.2.4; previous revision: 1.6.2.3 done Checking in parser/xml/src/nsSAXXMLReader.h; /cvsroot/mozilla/parser/xml/src/nsSAXXMLReader.h,v <-- nsSAXXMLReader.h new revision: 1.2.2.4; previous revision: 1.2.2.3 done
Keywords: fixed1.8.1
Updated•5 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•