Reverse UTF-8 String! Arabic Chat!
Hello, I have problem i try to Reverse a UTF-8 word but it's don't appear correct i have tried 2 codes.
The language i test in utf-8 arabic. First i try this code: PHP Code:
Second code: PHP Code:
Solved: HERE. |
Re: Reverse UTF-8 Word!
You are only reversing bytes which will work only for ASCII characters. UTF-8 characters may consist of multiple bytes. I think you may have to use AMXX 1.8.3-dev, there are some improvements regarding UTF-8 strings.
|
Re: Reverse UTF-8 Word!
Thanks man i understand the bytes difference. I have tested in latest dev version of amxmodx and not work also.
I forget to say that first code when write arabic nothing apear as if i don't write anything. I have see plugin you write but not works also. Here. If the problem regards amxmodx why not be fixed in next dev versions? |
Re: Reverse UTF-8 Word!
Quote:
|
Re: Reverse UTF-8 Word!
Quote:
|
Re: Reverse UTF-8 Word!
You should convert the string to UTF-16, then reverse. After that, convert the string back to UTF-8.
You can do that with this functions: PHP Code:
|
Re: Reverse UTF-8 Word!
@PRoSToTeM@, Worked thank you very much. Now i'll continue supporting my language :) .
|
Re: Reverse UTF-8 Word!
raheem.1
Is it possible to put the full code? |
Re: Reverse UTF-8 Word!
Quote:
|
Re: Reverse UTF-8 String! Arabic Chat!
Thx evry one for this plugin
PS: did not work in HL ? |
All times are GMT -4. The time now is 10:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.