06.01.2018, 09:47
Quote:
|
The charset doesn't support it probably, use
Code:
file -i file.log Code:
iconv -l Code:
iconv -f ISO-8859-1 -t UTF-8//TRANSLIT input.file -o out.file whereas,-f CHARSET if "from charset" and -t CHARSET is "to charset" `TRANSLIT` means that it will try to convert the file to another character, in case of a fail, it will replace it with a similar looking character that it can convert to. |
Code:
stock fileLog(file[], string[])
{
new time[6];
gettime(time[0], time[1], time[2]);
getdate(time[3], time[4], time[5]);
new timestr[32], data[128];
format(timestr,32,"[%02d.%02d.%02d|%02d:%02d] ",time[5],time[4], time[3], time[0], time[1]);
format(data, sizeof(data), "%s%s\r\n",timestr,string);
new File:hFile, thefile[32];
format(thefile, sizeof(thefile), "/logs/%s.log", file);
hFile = fopen(thefile, io_append);
fwrite(hFile, data);
fclose(hFile);
}


