Writing text files from macro - encoding?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Andys
Posts: 1
Joined: Thu May 22, 2008 4:36 pm

Writing text files from macro - encoding?

Post by Andys »

Hello, I have a little problem here.
I use a simple macro to write table contents into several txt files.
When I run it in Linux's Calc, everything works fine and the files are created in UTF-8 (=system) encoding.
In Windows, files are created also in system (and not utf-8) encoding.
So, the question - is there a way to force text encoding in windows when I write to a text file from macro?
I do not like the idea of having dual boot just because of a single task.

I use is a simple code like this:

Code: Select all

Open sFilename For Output As #1
print #1, ...
print #1, ...
Post Reply