SA-MP Forums Archive
Problem with file writing... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with file writing... (/showthread.php?tid=101721)



Problem with file writing... - Amit_B - 11.10.2009

Hey,

My server is using files to save some information (player stats, server logs, etc).
But, when I started to use SA-MP 0.3 RC8, the written chars is not on hebrew - the language that I using with the functions...

There is something that I can do to fix it?

Thanks for helpers.


Re: Problem with file writing... - Kalcor - 11.10.2009

If you use format() before fwrite() the characters are encoded in UTF-8. When you open the file in notepad open it as UTF-8 not ANSI.


Re: Problem with file writing... - Amit_B - 11.10.2009

I'm using format() before fwrite().
Well, I tried what you adviced, and the characters was changed, but it still not Hebrew and not readable.
If the 'problem' is in format(), i'll try to use strmid() or something different then format().


Re: Problem with file writing... - Amit_B - 13.10.2009

Hmm... a lot of files writing in my gamemode using format().
There is any solution?