L
L
letaon2012-05-18 22:57:45
PHP
letaon, 2012-05-18 22:57:45

Help with coding

Hello dear.

There is a problem on the site that has been haunting for a long time. When displaying random news, part of the text in the module is displayed in hieroglyphs. At the same time, not every news and random characters, i.e. there is no sequence.

It seems that the problem is in the encoding, but I don’t understand what and where to look. Please help me sort out the problem.

The site on Joomla 1.7
module is called "mega mini news"
site address: http://besage.net/

ps: bugs can be seen in the rotation and at the very bottom of the site

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
ainu, 2012-05-19
@letaon

Oh, the famous thing, which they promised to fix in PHP6 (making it the main feature), but failed.
Solution: go through the code and replace substr with mb_substr, strlen with mb_strlen. Perhaps other mb_ are analogues that you will find along the way.

T
TheMengzor, 2012-05-19
@TheMengzor

How do the names of all these modules deliver - mega-mini-news, super-maxi-coments ... :)

S
silentnuke, 2012-05-18
@silentnuke

I suspect that you have utf-8 encoding. accordingly, Russian characters occupy more than one byte. Next, your output function takes n-number of bytes of text, and in some cases, a character byte is cut off, from which the hieroglyph appears.

I
Ilya Plotnikov, 2012-05-18
@ilyaplot

Look at the encoding of the tables of this module. Apparently, it differs from the encoding of other tables.

L
letaon, 2012-05-19
@letaon

To be honest, I don’t really understand all these subtleties, but what is mb_substr, strlen, etc.? Do you need to search for these "commands" in all module files or only in php files?

I
Ilya Kovalevsky, 2012-05-19
@namespace

Most likely, the matter is in the script that cuts out this piece of the article or in the script that displays it. But I'm not sure.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question