RC FTP + Unicode

The RC FTP still mangles Unicode Characters in filenames upon moving/editing

Renamed file guildJätte Kult.txt to guildJätte Kult.txt
Folder changed to guilds/
Downloaded file guildJätte Kult.txt
Renamed file guildJätte Kult.txt to guildJätte Kult.txt
Folder changed to guilds/
Downloaded file guildJätte Kult.txt
Uploaded file guildJätte Kult.txt

Okay, all the Unicode stuff has been fixed with file saving/loading/renaming. Also, the RC move command has been fixed and won’t delete files anymore.

This is all because Microsoft doesn’t convert UTF-8 to UTF-16 using the mbstowcs() command, even if you call setlocale() specifying a UTF-8 codepage. I had to make use of the MultiByteToWideChar() Windows API command to correctly convert. In another hilarious turn of events, when trying to rename “Jätte Kult.txt” to “Jätte Kult 2.txt”, Graal was sending the first one as ASCII, and the second one as UTF-8! I currently do a double MultiByteToWideChar() pass to determine if it is a valid UTF-8 string before attempting to convert, else I just do a direct character copy.

Technically, it can still fail in some edge cases, but those failures will now be the result of the RC itself, not the gserver.

LOL. Thank you again. And it’ll be nice to not have to avoid the move command.

Why don’t you just edit your GServers? You used to do it all the time.

Because my Visual C++ compiler wants validation when my comp is not legit.
And because my Code::Blocks hates BOOST no matter how many times I link the libraries.

As such, I can’t compile the GServer anymore, therefore, I cannot edit it.
Ergo, Sentinel is broke. And just to make sure, “vis-à-vis”.

Jeez. Just remake Sentinel!

No GServer mods = No custom map system or serverside Item Drop protection.

Then ask someone else to do it. Jeez. thnytn 8u7

http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef

[QUOTE=Nalin;33142]http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef[/QUOTE]

I’ll get around to it the next time I reformat my PC.
I still remember the good ol’ days, where I would have to reformat my PC about 3 times a week. Christ it was such an unstable fuck.