Hello, I have a nez weird problem today...
Do you happen to know what the file encoding of .zgeproj files is? I believe it’s UTF-8, right?
Since yesterday, when I open my project in Sublime Text and then open it in ZGameEditor, all the French characters are messed up. I can’t save my project in ZGameEditor anymore, otherwise everything will be broken afterward.
é → é
è → è
ù → ù
and so on...
It’s as if ZGameEditor is reading the file using Western (Windows-1252) encoding instead of UTF-8.
I tried opening my file with UTF-8 encoding in Sublime Text, and saving it as UTF-8 again, but when I open it in ZGameEditor, it still gets interpreted as Windows-1252.
That’s so weird. I haven’t changed anything in either ZGameEditor or Sublime Text.
Could a Windows update have caused this? (I had one yesterday...)
Problem with zgeproj file encoding
Moderator: Moderators
Re: Problem with zgeproj file encoding
Never mind, I found it. The problem was coming from the .zgeproj's xml definition:
<?xml version="1.0" encoding="iso-8859-1" ?>
instead of
<?xml version="1.0" encoding="utf-8" ?>
I have no idea how this was changed...
<?xml version="1.0" encoding="iso-8859-1" ?>
instead of
<?xml version="1.0" encoding="utf-8" ?>
I have no idea how this was changed...

Re: Problem with zgeproj file encoding
All right, so it was ZGameEditor that put "iso-8859-1" in the XML encoding, so everything was normal after all.
But I made the mistake of saving my project from ZGE, so now all the éèù... characters are permanently broken. This time, they’ve all been replaced by "?", so I can’t even use search and replace to restore what I had.
I’ll gradually change my comments in the code to English whenever I stumble upon broken French words.
I still have no idea what happened in the first place. I’ll run some tests when I have some time.
But I made the mistake of saving my project from ZGE, so now all the éèù... characters are permanently broken. This time, they’ve all been replaced by "?", so I can’t even use search and replace to restore what I had.
I’ll gradually change my comments in the code to English whenever I stumble upon broken French words.
I still have no idea what happened in the first place. I’ll run some tests when I have some time.
Re: Problem with zgeproj file encoding
Always a good idea to keep .zgeproj files in source control so you can revert any mistakes

Re: Problem with zgeproj file encoding
I have version control in Dropbox, but I often save more than the history limit allows. My SublimeText script saves the file in order to run it. I could try a revert, like I did yesterday, but this is the second time ZGE has broken all the characters in my years-long project in just two days. So I’m just letting it go.
The weird character problem appeared after the Windows update on my computer. Today, my laptop wants to do the same update, so I’ll run tests on both computers before letting the laptop update.
The weird character problem appeared after the Windows update on my computer. Today, my laptop wants to do the same update, so I’ll run tests on both computers before letting the laptop update.
Re: Problem with zgeproj file encoding
I should update ZGE so it uses utf-8 mode by default to avoid these issues.