Page 1 of 1

[Linux] writing XML File, i get a binary and no text file

Posted: Mon Jun 25, 2007 12:42 am
by sir_gon
When i write an XML File on windows, i get a text file (this is normal). But on Linux (Ubuntu Dapper/Edgy/Feisty and Opensuse 10.2), myfile.xml is saved as a binary :shock:

When i read myfile.xml with Irrlicht, has no problems :shock:, but when i want to open myfile.xml with kate or nano, they warn me because the file is corrupted or is a binary.

If i convert to text, looks likes a normal text file, except because it has a space between each character.

This happens since I proved irrlicht 1.1 up to 1.3.1 happening through 1.2 and 1.3

¿This is normal? ¿Can be changed?

Posted: Mon Jun 25, 2007 1:58 am
by datamagik
I sounds like you may be writing the internal 16 bit wide character format in the Linux version. This would explain why a simple text editor might believe it was a binary file, and why you're seeing spaces between characters.

Posted: Mon Jun 25, 2007 7:44 am
by hybrid
On Linux it should write UTF-32 files. It was reported to be working correctly, so maybe try to change the text format. Or use less, it has working UTF-32 support. Any real XML browser should also support those files.

Posted: Mon Jun 25, 2007 12:29 pm
by CuteAlien
Most linux editors (and also some other tools like 'less' and 'grep') do not yet work with utf-32. The only editor I know which will work is vi, but without even trying I'm quite sure emacs will also do...