SA-MP Forums Archive
[Problem] Hebrew writing to file... - 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] Hebrew writing to file... (/showthread.php?tid=106869)



[Problem] Hebrew writing to file... - BlueRey - 06.11.2009

Hello guys!

i have a problem..
Quote:

[23:17:08] [CHAT] [Os]Gezer (2): арй оцмйз шч 26 щрйеъ мдецйа аеейш бмй мрщен

It's not writing the Hebrew language to the file.
It happens only in Version 0.3a.
Can fix it?


Re: [Problem] Hebrew writing to file... - Gergo1352 - 06.11.2009

Quote:
Originally Posted by Kye
It was previously OEM/ANSI/single-byte ISO-8859-1 in 0.2X, now it's in UTF-8 in 0.3a. A function such as utf8_decode() in php can decode it back to single-byte.



Re: [Problem] Hebrew writing to file... - BlueRey - 06.11.2009

utf8_decode
How can I use it?


Re: [Problem] Hebrew writing to file... - Amit_B - 06.11.2009

I also reported it - http://forum.sa-mp.com/index.php?topic=126750.0
Even if you opening the file as UTF-8, the Hebrew chars still not readable.
Dunno if there is any way to fix it...

^ and about utf8_decode, as Kye said in the quote, this is a PHP function, not Pawn.


Re: [Problem] Hebrew writing to file... - Kalcor - 06.11.2009

Is this from the server_log.txt or from using format() and fwrite()?


Re: [Problem] Hebrew writing to file... - Badger(new) - 06.11.2009

I'm guessing format and fwrite as the server log saves it as:
[HH:MM:SS] [chat] [Name]: Message


Re: [Problem] Hebrew writing to file... - BlueRey - 07.11.2009

Quote:

Is this from the server_log.txt or from using format() and fwrite()?

yes..


Re: [Problem] Hebrew writing to file... - Daren_Jacobson - 07.11.2009

Quote:
Originally Posted by `DivX
Quote:

Is this from the server_log.txt or from using format() and fwrite()?

yes..
you can't answer yes to a "this or this" question


Re: [Problem] Hebrew writing to file... - BlueRey - 07.11.2009

right.
i'm using "format() and fwrite()".


Re: [Problem] Hebrew writing to file... - Badger(new) - 07.11.2009

Couldn't you do something like converting the symbols to their value (strval), then when you need to see the symbols (and it is possible to display them), convert them to a string from the values?