Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Sat, Mar 5, 2011 at 3:42 PM, vzoukos <vzoukos@otenet.gr> wrote:

On Ubuntu 10.04 LTS with LibreOffice (3.3 330m19(Build:8)) using the command
line for conversion:
$ libreoffice \
-invisible \
-headless \
-norestore \
-convert-to ods x.csv
if the file x is a *.csv text file with encoding ISO8858-7 or UTF-8 the text
in the resulting *.ods file is encoded in ISO8859-1. Any tips?


I tried out several variations of the above command and I see that it
is a general problem
that affects any non-ISO8859-1 script, such as Cyrillic, Latin
Extended, Arabic, Chinese, and so on.

Here is an example so that you can easily test. It's a CSV file with
Unicode text. The second row has the words aero and train with a
variety of accents.

$ cat /tmp/test.csv
"First","Second"
"áéŕó","ṫřåiṅ"
$ _

Let's run it through LibreOffice headless:

$ libreoffice -headless -convert-to ods /tmp/test.csv
convert /tmp/test.csv -> /tmp/GNOME-TM/test.ods using OpenDocument
Spreadsheet Flat XML
Warning: at xsl:stylesheet on line 2 of
file:///usr/lib/libreoffice/basis3.3/share/xslt/odfflatxml/odfflatxmlexport.xsl:
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
$

The resulting test.csv has the text

            <table:table-row table:style-name="ro1">
               <table:table-cell office:value-type="string">
                  <text:p>áéŕó</text:p>
               </table:table-cell>
               <table:table-cell office:value-type="string">
                  <text:p>ṫřåiṅ</text:p>
               </table:table-cell>
            </table:table-row>

What this means is that the XSLT transformation considered that the
input text had the iso-8859-1 encoding instead of being UTF-8.

Can anyone give a hint as to where to look to set the encoding or
perhaps change the default?
This looks to be an easy fix to LibreOffice, if we can find the source
of the problem.

Simos

-- 
Unsubscribe instructions: E-mail to users+help@libreoffice.org
List archive: http://listarchives.libreoffice.org/www/users/
*** All posts to this list are publicly archived for eternity ***

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.