Bug 211990 - metadata format is locale dependant
Summary: metadata format is locale dependant
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.9.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 212387 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-26 22:10 UTC by bugzilla
Modified: 2009-12-26 18:05 UTC (History)
1 user (show)

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 bugzilla 2009-10-26 22:10:11 UTC
Version:           0.9.2 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

When exporting an annotated PDF to an Okular document archive, the metadata.xml file will contain locale dependant information. Specifically the coordinates of any annotations will be stored with the locale delimiter.

A document stored with the Danish locale will have the following coordinate format:
<line closed="1" >
      <point x="0,2466307277628032" y="0,5881168177240684" />
      <point x="0,5849056603773585" y="0,5861027190332326" />
      <point x="0,5822102425876011" y="0,6545820745216515" />
      <point x="0,2452830188679245" y="0,6545820745216515" />
</line>
with a comma (,) as the delimiter. If this document is open on a machine with for example an English locale, all annotations are shown in the review sidebar, but not in the actual document. Closing/exporting the document will change all annotations to the form <point x="0.0" y="0.0" /> which will render the document useless on the machine with the original locale.

A search and replace for , to . (comma to dot) in the metadata.xml file will work as a workaround.
Comment 1 Albert Astals Cid 2009-11-17 20:37:59 UTC
SVN commit 1050633 by aacid:

setAttribute with doubles is evil as it uses the current locale and we don't want that, use QString::number
BUGS: 211990


 M  +32 -32    annotations.cpp  
 M  +1 -1      document.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1050633
Comment 2 Albert Astals Cid 2009-11-17 20:45:23 UTC
SVN commit 1050640 by aacid:

backport r1050633 okular/trunk/KDE/kdegraphics/okular/core/ (annotations.cpp document.cpp): 
setAttribute with doubles is evil as it uses the current locale and we don't want that, use QString::number
BUGS: 211990


 M  +32 -32    annotations.cpp  
 M  +1 -1      document.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1050640
Comment 3 Pino Toscano 2009-12-26 18:05:41 UTC
*** Bug 212387 has been marked as a duplicate of this bug. ***