Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335026

Summary: Wrong character encoding assumed when reading default CSS files
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: 1.4 M6   
Hardware: All   
OS: All   
Whiteboard:

Description Rüdiger Herrmann CLA 2011-01-21 10:49:26 EST
Currently all source code files in RAP are encoded as ISO-8859-1.
The ThemeManager expects all CSS files to be encoded as UTF-8, even the default CSS files like Button.default.css
This may lead to exceptions when the default CSS file contains charaters like umlauts etc.
Comment 1 Ralf Sternberg CLA 2011-01-22 10:41:35 EST
The reason for UTF-8 was that the ThemeManager also reads CSS files that are provided by custom themes. I thought that UTF-8 would be a better default than Latin-1, as Latin-1 can only encode a few Unicode characters.

Of course, the problem behind this is that the encoding of CSS files is silently assumed and can't be defined in the theme extension. However, I'd prefer to stay with a default encoding, but we should document this somewhere.

Instead of changing the default to Latin-1, I would very much like to change our source encoding to UTF-8, as this is better anyway - I opened bug 335090 for this request.
Comment 2 Rüdiger Herrmann CLA 2011-01-23 09:17:10 EST
(In reply to comment #1)
> [ ... ]
> Instead of changing the default to Latin-1, I would very much like to change our
> source encoding to UTF-8, as this is better anyway - I opened bug 335090 for
> this request.
+1
Having all sources in UTF-8 would not only solve this particular issue but also make life easier in other areas.
Comment 3 Ralf Sternberg CLA 2011-02-06 18:53:36 EST
Since bug 335090 is fixed, default CSS files are now UTF-8. I added a note to the theming documentation saying that CSS files have to be UTF-8 encoded.