Bug 290200

Summary: "Export data" generates an non-UTF-8 enconded file
Product: [Applications] kalzium Reporter: André Marcelo Alvarenga <alvarenga>
Component: generalAssignee: Kalzium Developers <kalzium>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Chakra   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: HTML file with non-UTF-8 enconded
HTML file patched

Description André Marcelo Alvarenga 2011-12-30 18:33:01 UTC
Version:           unspecified (using Devel) 
OS:                Linux

In pt_BR very elements names have accents, i.e. Hidrogênio, Hélio, Berílio...

When a file is exported with "Export Data..." the result is a non-UTF-8 enconded file.

Reproducible: Always

Steps to Reproduce:
- Open Kalzium with pt_BR translations.
- Choose Arquivo (File in english) -> Exportar dados... (Export Data... in english).
- In 'Elementos', select Hélio, Berílio and Nitrogênio.
- In 'Propriedades', select Massa atômica and Afinidade eletrônica.
- Enter a html filename.
- Click in OK button.
- Open the html file with Konqueror (or other Web Navigator)

Results: See screenshot.

Actual Results:  
non-UTF-8 enconded file

Expected Results:  
UTF-8 enconded file

If you insert the line as described below, the file opens correctly.

<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
Comment 1 André Marcelo Alvarenga 2011-12-30 18:34:49 UTC
Created attachment 67259 [details]
HTML file with non-UTF-8 enconded
Comment 2 André Marcelo Alvarenga 2011-12-30 18:36:32 UTC
Created attachment 67260 [details]
HTML file patched
Comment 3 Etienne 2011-12-30 21:16:05 UTC
Git commit 913d1a4310d5e6cb67fecb6e81b3ab81a5ac613f by Etienne Rebetez.
Committed on 30/12/2011 at 21:42.
Pushed by erebetez into branch 'KDE/4.8'.

Export data dialog: Add encoding utf-8 to the html and xml header.
Thanks Andre for the hint.

M  +2    -1    src/exportdialog.cpp

http://commits.kde.org/kalzium/913d1a4310d5e6cb67fecb6e81b3ab81a5ac613f
Comment 4 Etienne 2011-12-30 21:16:05 UTC
Git commit 7b68fd93b52041c48acc8871e163c25b69e7b05e by Etienne Rebetez.
Committed on 30/12/2011 at 21:42.
Pushed by erebetez into branch 'master'.

Export data dialog: Add encoding utf-8 to the html and xml header.
Thanks Andre for the hint.

M  +2    -1    src/exportdialog.cpp

http://commits.kde.org/kalzium/7b68fd93b52041c48acc8871e163c25b69e7b05e