In my site after update to TP 1.0RC1 i there was a problem with the coding of the Russian text in UTF-8. When I save the text, he will be transformed to not clear symbols though in a database the data remains correctly. As a result blocks and articles PHP with the Russian text are displayed not correctly.
This problem is only in blocks and articles PHP type.
How to me to eliminate this problem?
Ok! Who knows what part of a code is responsible for a conclusion to the screen of the editor of PHP block and a code in him for the created block?
saks2008, this is a problem that only Bloc can handle. He has been really busy and not around much lately, so you'll just have to wait for him to come around. If I were you I would post your problem in the bug tracker.
http://www.tinyportal.net/index.php?project=1
ok! thank you very much! I and will make
I know it's been a while saks, but can you tell me a few things? Does this only happen with old blocks? Does it look the same if you create a new block? Can you provide me with some test cases? Now that I'm doing Development for this project I'd like to try and understand and hopefully fix this problem for you. :)
Oþ! It is remarkable! The problem is observed only in PHP blocks and PHP articles. It arises if I edit the old blocks created still before updating TP and if I create new blocks.
P.S. All English text and code is ok, but Russian UTF-8 text is damaged after i click save button :-\
Can you show me some text that has the problem? I can't type the text on an English keyboard. :) Show me the before and after text so maybe it will help.
Quote from: IchBin on December 11, 2010, 04:19:48 PM
Show me the before and after text so maybe it will help.
Yes! look this
before text : ÿÃ'â,¬Ã¾Ã²ÃµÃ'â,¬ÃºÃ° Ã'â,¬Ã°Ã±Ã¾Ã'‚Ã'‹ ñûþúð
after save text : ÃÂÃ,¿Ã‘�ÃÂÃ,¾ÃÂÃ,²ÃÂÃ,µÃ‘�ÃÂÃ,ºÃÂÃ,° �ÃÂÃ,°ÃÂÃ,±ÃÂÃ,¾Ã‘�� ÃÂÃ,±ÃÂÃ,»ÃÂÃ,¾ÃÂÃ,ºÃÂÃ,°
Saks,
Could you post those again using code tags (#) so that Ichbin can see exactly what code you used. When you just Just post it without code tags, it could possibly not be formatted correctly. Something like this ...
Before ...
ÿÃ'â,¬Ã¾Ã²ÃµÃ'â,¬ÃºÃ° Ã'â,¬Ã°Ã±Ã¾Ã'‚Ã'‹ ñûþúð
After ...
ÃÂÃ,¿Ã‘�ÃÂÃ,¾ÃÂÃ,²ÃÂÃ,µÃ‘�ÃÂÃ,ºÃÂÃ,° �ÃÂÃ,°ÃÂÃ,±ÃÂÃ,¾Ã‘�� ÃÂÃ,±ÃÂÃ,»ÃÂÃ,¾ÃÂÃ,ºÃÂÃ,°
Thanks,
ZarPrime
That is exactly what he posted Zar. No code involved, just text. I'm gonna test this out and see how things work for me.
OK, I didn't know if that was the code he had in the php block or the output from it. Sorry :-[
ZP
P.S. If this information helps business:
Table and DB collation - utf8_general_ci
Thanks for the info saks. I don't know what it is yet.. But I'm hoping to bug some people that might have a clue. I'll go bug some SMF friends about this and see if they have any suggestions. If not, I'll bug Bloc. But I'm trying not to do that. :)
Thank you very much! This error strongly complicates use TP. I will be very glad if she manages to be solved. I think that it can be connected that function which sends the data in a database twice will recode the sent text, and from for it such result turns out.
Sorry for my English!
Ok saks, I racked my brain on this one for quite a while. Even asking friends at SMF they didn't get me where I needed. I ended up even going as far as to re-write the query using SMF's $smcFunc['db_query'] to see if TP's tp_query() was a problem. lol
In the end, it was simply removing a call to htmlentities() that fixed it for me... I swear I did that when I first started, but apparently I must not have. Anyway, go to Themes/default/TPortalAdmin.template.php and find this on about line #2863.
<textarea style="width: 94%;" name="tp_block_body" id="tp_block_body" rows="15" cols="40" wrap="auto">' , htmlentities($context['TPortal']['blockedit']['body']), '</textarea>
Change to this:
<textarea style="width: 94%;" name="tp_block_body" id="tp_block_body" rows="15" cols="40" wrap="auto">' , $context['TPortal']['blockedit']['body'], '</textarea>
Wow! IchBin thank you very match! It's work! It's an excellent gift before new year! I congratulate you with coming new year!
Will mark this topic solved. O0
ZarPrime