Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Bug-reports    Topic: SOLVED - Latest Comments Module - Not displaying accents
Pages: [1]   Go Down
  Print  
Author Topic: SOLVED - Latest Comments Module - Not displaying accents  (Read 5227 times)
0 Members and 1 Guest are viewing this topic.
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« on: October 12, 2009, 10:24:31 »

Hi there,

Following installation and activation, I realised that accents such as à, é ï, ê and others are not rendered by the module. Instead, I see a square. The language of my site is french.

The Jcomments component displays accents fine in the front end, but when I go back end in the "Comments management section" of the component, accents are shown as squares.

I did a little research on the Internet, and the term UTF-8 seems to be the key to my problem. However, I'm not very familiar with this subject, and don't know where to start.

What can I do so that the Latest Comments module displays the accents?

Version of module: 2.5.4
Version of component: 2.1.0.0
Version of Joomla: 1.5.14

Any help would be AMAZING!!!!

Thanks in advance!  Grin
« Last Edit: September 01, 2010, 06:31:04 by David892 » Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #1 on: October 12, 2009, 11:55:57 »

Try make small fix:

Open jcomments.class.php and replace code

Code: (php)
$text = htmlspecialchars($text);
$text = html_entity_decode($text);

with
Code: (php)
$text = htmlspecialchars($text);
$text = html_entity_decode($text, ENT_COMPAT, 'UTF-8');

And wrote me if this fix solves this problem...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #2 on: October 12, 2009, 12:18:54 »

Ouch!  Cry I replaced the code and it gave me 500+ errors like this one:

Warning: cannot yet handle MBCS in html_entity_decode()! in E:\Inetpub\vhosts\tremblaylecuyer.com\subdomains\hockey\httpdocs\components\com_jcomments\jcomments.class.php on line 721
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #3 on: October 12, 2009, 12:28:23 »

Hmmm... what version PHP do you use? Try to remove line:

Code: (php)
$text = html_entity_decode($text);

Wink
« Last Edit: October 12, 2009, 12:53:24 by smart » Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #4 on: October 13, 2009, 05:28:15 »

Hi smart,

I removed the line mentioned above, but it had no impactAngry

Also, I found out:

This character: é is showing fine on the module. (back end and front end)
This character: à is rendered as a square and thus does not show. (back end and front end)


Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #5 on: October 13, 2009, 11:14:41 »

Hm, try this on demo.joomlatune.com, please. I don't see any problems with accented letters in JComments Latest module
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #6 on: October 13, 2009, 23:08:31 »

You are right. I posted a comment with accented characters, and the front end module displayed them fine (all of them).

We can thus affirm that the module is not the cause. What could it be? A Joomla! issue?

 Huh
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #7 on: October 13, 2009, 23:18:54 »

One more thing: on demo site installed new upcomming version of JComments with fix I've post here (removing one line from jcomments.class.php). If you want I can give you this build for tests...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #8 on: October 14, 2009, 04:17:27 »

Since I removed the line and it did not change anything, I guess I will wait for the official release.

This accents issue is killing me!  Shocked

 Grin
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #9 on: October 14, 2009, 04:19:37 »

I guess I will wait for the official release
as you wish Wink
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #10 on: October 14, 2009, 04:23:18 »

Hey smart,

You want to hear the weirdest thing ever? After trying to better understand my issue, I found out that your Latest Comments Module was displaying ALL ACCENTS fine except ONE.

This character "à" is the only one not displaying. Even more interesting: If I do a capital letter with the same symbol like "À", your modules renders it perfectly!

You must admit that this is quite a weird issue!!!

 Grin Grin Grin
Logged
smart
Administrator
Hero Member
*****

Karma: 146
Offline Offline

Gender: Male
Posts: 2579



WWW
« Reply #11 on: October 14, 2009, 04:28:02 »

This character "à" is the only one not displaying.
I look at this comment: comment-724, it contain this accented letter and this comment correctly displayed in the JComments Latest module published on site...
« Last Edit: October 14, 2009, 04:33:16 by smart » Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #12 on: October 14, 2009, 04:34:32 »

haha that was my test message !  Grin  Grin  Grin

I guess I'll wait for your next build then! Hopefully it will solve my problem!!! Thanks for your help!  Cheesy
Logged
David892
Newbie
*

Karma: 0
Offline Offline

Posts: 13


« Reply #13 on: August 31, 2010, 05:13:13 »

I know this is an old topic, but just in case someone is having the same issue:

UPDATE TO VERSION 2.2 !!!!

It solved everything! All accents displaying PERFECT! Great job on the update!!!!

 Cool Cool
Logged
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Bug-reports    Topic: SOLVED - Latest Comments Module - Not displaying accents
 
Jump to: