Bug 100993 - (testcase) linked stylesheet causes improper rendering of css quotes
Summary: (testcase) linked stylesheet causes improper rendering of css quotes
Status: RESOLVED DUPLICATE of bug 79065
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: 3.4
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-06 20:11 UTC by illogic-al
Modified: 2005-03-06 22:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description illogic-al 2005-03-06 20:11:59 UTC
Version:           3.4.0 (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:                Linux (i686) release 2.6.10-mm3

I have a linked stylesheet which changes quotation styles based on the language being used. In both firefox and opera the linked styles show up properly, but in konqueror they only show up properly if included directly in the page.

expected behavior with <q> for a french locale is to display « »
instead an A with a circumflex (smaller version of ^) above it is displayed before each french quote. 
CSS styles which are included in page override linked styles which is why testcase 2 works.

maybe this bug is related in some way to http://bugs.kde.org/show_bug.cgi?id=59507

testcase 1: http://illogic-al.org/~kdetest/fr_quotes_test.html should display improper rendering
testcase 2: http://illogic-al.org/~kdetest/fr_quotes_test2.html should be displayed properly.
The linked stylesheet is at http://illogic-al.org/~kdetest/css/test.css

Some more weird things of note. the css above was written using quanta's katepart. In those editors the css file displays :lang(fr) {quotes: '« ' ' »';}
in firefox however the same file shows up as th :lang(fr) {quotes: '« ' ' »';}
So viewing the test.css file directly in firefox shows up the unwanted characters, but they do not show up in the final rendered test page. Conversely the characters do not show up when test.css is viewed in quanta/kate editors but it does show up in the final rendered test page.

And now for pure conjecture. Feel free to ignore everything below this line.
I think khtml uses a katepart to view text so the katepart give khtml the text and then khtml does whatever it does and renders it. when things are linked however (liked the stylesheet) khtml must interpret that text itself. Viewing test.css in firefox shows that the funky A character is actually a part of the french quotes (maybe some utf8 instruction converted to text?) but gecko and opera too interprets/ignores it and renders the french quotes as expected. So methinks khtml needs a bit of code to parse/interpret/ignore utf8 instructions (assuming that that's what that funky A + ^ character is. 
How to do this is left as an exercise for the (forthcoming) reader :-)
Comment 1 illogic-al 2005-03-06 20:13:58 UTC
updating version and platform info.
this is a checkout from KDE_3_4_BRANCH
Comment 2 Thiago Macieira 2005-03-06 22:14:28 UTC
Encoding problems.

Add charset="utf-8" or whatever to the <link> tag.

*** This bug has been marked as a duplicate of 79065 ***