Oh! I can create a ticket!?!
So here is my demand:
I'm very puzzled With FreeOrion Latest versions (december 2013 and january 2013): I CANNOT SAVE MY GAMES!
The game mentions an "Invalid UTF-8" error, however this didn't happen with the version I downloaded in 2012... Is this a consequence of the 2012 World's End?
What OS are you using?
What exact FreeOrion version are you using?
What in-game empire and player name are you using?
If Windows, what is your Windows user name, and what language is your system set to?
Can you locate and attach freeorion.log and freeoriond.log from immediately after starting a game and trying and failing to save in this manner? These files are located in the directory discussed here: http://freeorion.org/index.php/Config.xml
Read this post entirely: I found a way to fix the bug, not smartly, but it works!
My OS is Windows XP-SP3, set in french, HD free space: 1Gb+.
My user's account has the admin's rights and its name (generated by Windows) has no special characters, no accentuated character (such as 'éêèë' just for the 'e' ;-)
With the FE version I downloaded one year ago (v.0.4.4635) there was no problem when saving/loading a game.
But since I downloaded a 'new' version in december 2013 (v.0.4.6281) I can't save my games (Error message: "Invalid UTF-8").
The same error message is displayed when I try to load a game. (Note: I'm still using the same computer).
Meanwhile, I downloaded the v.0.4.6593 (january 2014?) and the bug is still there.
I always play the Human and the player's name has no effect: I used many and used only common characters... the UTF-8 error is still occuring.
I can't open the address you mentionned (http://freeorion.org/index.php/Config.xml) but I could find the freeorion.log and freeoriond.log files anyway (in C:\Documents and Settings\My.Account\Applications Data\FreeOrion).
I openned them and I found that the game was automatically saved as *.SAV files in C:\Documents and Settings\My.Account\Applications Data\FreeOrion\Save\Auto...
The last modification date/time seems to be correct...
Size: 329 Kb (for 256 stars ;-)
What a long file name! What a long path name!
...
Hu-ho!
Hem... I ain't a good judge, but... Isn't the path+file name a too long string (129 characters)?
BINGO!!!!
I openned the game's Setting window and shortened the SAVE directory's path by 5 characters (shorter than 128!) and it works! I can save and load games!
I just erased "\SAVE" from the path.
I suggest you shorten either the Save Directory path either the file's name.
In addition, you could make the game check for the path+file name's length and eventually ask the player to shorten them if longer than 128 characters.
The save path can't really be shortened. The application data directory is the expected place to store such files, and its path is determined by Windows. Removing "save" is not a substantial savings and would pollute the enclosing directory with save files.
I'm not aware of any reason for a 128 character limit in a path. There are various limits on parts of a path name, and Windows 2000 reported has a 260 character limit, but not 128 and the full path...
http://www.boost.org/doc/libs/1_51_0/libs/filesystem/doc/portability_guide.htm#recommendations
I also can't replicate such problems on Windows 7 with several layers of nested long-name directories within the standard save file location, which add up to well over 128 characters.
Can you find some documentation about why there should be a 128 character limit on your OS?
I ain't a programmer and you're probably a better judge than me ;-)
I assume my Windows version (XP) is older than yours and they probably don't use the same BUS size. I imagine Windows XP uses a 8 bits BUS (like the first PC computers) but newer computers use a 16 or 32 bits BUS.
Technically, there's nothing you can do except to change the SAVE directory to a location nearer to the HD root but it will be difficult with Windows above all when the player uses a multi-acounts configuration.
I think the best thing to do is to make FreeOrion to test the SAVE directory path's length and the Windows version, and if the UTF-8 error may occure, to warn the player and ask him for a new SAVE directory. Thus the player would be warned and would choose himself the new path, and I assume he'll be to too lazy to enter a too long path name ;-) Anyway FO should test the new path length.
Last edit: Billy Venus 2014-02-22
As the bug explicitely speak about UTF8 (which may be converted to BOM marker + multibyte character string under windows) a 128 characters path may end up tripping a 260 bytes limit somwhere. Wouldn't that be a plausible explanation ?
Can the OP try to pinpoint exactly at which character length the bug is happening ?
That may help root-cause the thing...
Just my 2 cents
Last edit: Vincent Legoll 2015-03-03