Write in a different langauge using fwrite - 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)
+--- Thread: Write in a different langauge using fwrite (
/showthread.php?tid=619729)
Write in a different langauge using fwrite -
NeXoR - 21.10.2016
Hey guys, I am having some errors with my function:
PHP код:
#undef fwrite
fwrite_utf8(File:handle, str[], bool:use_utf8 = false)
{
if(!handle) return 0;
new x;
while(str[x] != EOS) fputchar(handle, str[x++], use_utf8);
return 1;
}
I want to write in my native language to the logs in-case someone writes in non-English, it shows me tons of errors and warnings, anyone ?
Re: Write in a different langauge using fwrite -
Kaliber - 21.10.2016
This function is bullshit...
cause fwrite writes in UTF-8...and is much faster then this loop...
Re: Write in a different langauge using fwrite -
NeXoR - 21.10.2016
Quote:
Originally Posted by Kaliber
This function is bullshit...
cause fwrite writes in UTF-8...and is much faster then this loop... 
|
Yeah after a quick SAMP WIKI reading I realized the stupidity.
I'll look for something else, thanks.