21282 Posts in 5730 Topics by 2601 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1936 Views |
-
       <-- these characters keep appearing!

16 May 2011 at 11:27pm Last edited: 16 May 2011 11:34pm
I can remove them with...
return utf8_decode ($content);
... but why do these things keep appearing on sites? how can I rid myself of them for ever?please help! it is driving me CRAZY!
-
Re: Â Â Â Â Â Â Â <-- these characters keep appearing!

17 May 2011 at 3:43am
I only see them crop up when I'm in Dev mode and I'm outputting stuff with Debug::show();
I would assume there is a character in one of the base classes that you'll have to find.Now that I think about it, I've seen stuff like this crop up when my co-worker uses Dreamweaver to edit php files with the wysiwyg editor, you'll have to zap the gremlins.
-
Re: Â Â Â Â Â Â Â <-- these characters keep appearing!

17 May 2011 at 9:23am
Thanks, I did kinda throw it out there without much info... made me remember teh chinese outsurcers that left chinese comments in the code (amongst other things...)
It is coming from the database it gets into the content, page titles, etc.
I think it is after I run a mysqldump and then restore it (all via Lunix shell and without transferring the file out the box), but today just upgrading a site to 2.4.5 and running a db build did it this time...any advice now I've been a bit more specific - any ideas? config settings? db settings?
all suggestions welcome
-
Re: Â Â Â Â Â Â Â <-- these characters keep appearing!

19 May 2011 at 3:55am
Thanks to FinBoWa on IRC...
using
SHOW VARIABLES LIKE 'character_set%';
SHOW VARIABLES LIKE 'collation%';to see that my db was...
collation_connection utf8_general_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ciThen after running the following SQL (from http://muzso.hu/2008/04/09/how-to-change-the-character-set-and-or-collation-in-a-mysql-database-for-all-tables-and-c)
SELECT CONCAT('ALTER TABLE `', t.`TABLE_SCHEMA`, '`.`', t.`TABLE_NAME`, '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') as stmt
FROM `information_schema`.`TABLES` t
WHERE 1
AND t.`TABLE_SCHEMA` = 'sm_sandbox'
ORDER BY 1the collation is this...
collation_connection utf8_general_ci
collation_database utf8_general_ci
collation_server latin1_swedish_ciI am removing the characters for the last time (hopefully) as my db should now be setup correctly, if not I'll update this thread...
-
Re: Â Â Â Â Â Â Â <-- these characters keep appearing!

23 May 2011 at 2:42am
I think you could also try to filter the input, and everytime someone introduces this kind of letters you will replace them with what ever you want..
-
Re: Â Â Â Â Â Â Â <-- these characters keep appearing!

23 May 2011 at 8:31pm
Hi jocuri,
Thank you for the reply - in my case everyone is adding characters like... ', £ or just a space (for all I can tell) and then after a dev build or a backup and restore the strange characters appear. I did strip these characters when displaying "Content" - but it affects every HTMLText and Text field (again for as far as I can tell) - How would I easily filter it from all of these do you think? Create a custom HTMLTextField and TextField class? I'd be concerned that that is the wrong way to go about it...
-
Re: Â Â Â Â Â Â Â <-- these characters keep appearing!

21 June 2011 at 2:02am
so this now seems to have settled down... the solution was to add the following vhost.conf in the conf folder of the vhost...
<Directory /var/www/vhosts/NAMEOFDOMAIN/httpdocs/>
AddDefulatCharset UTF-8
</Directory>
| 1936 Views | ||
|
Page:
1
|
Go to Top |


