hocbui / joomla-gcalendar

Automatically exported from code.google.com/p/joomla-gcalendar
0 stars 0 forks source link

When enabling mod_gcalendar_upcoming, site codepage changes #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable mod_gcalendar_upcoming
2. View site with some NLS chars (e.g. ü, ö, æ, ø, å)

What is the expected output? What do you see instead?
Example:  NLS "ø" is displayed as FFFD in a box (Firefox for Win), a square
box (MSIE) or square w/ questionmark (Firefox for Linux).

If I disable mod_gcalendar_upcoming, all NLS chars displays correctly.

National chars are of the evil, but unfortunately necessary...  My site is
running Country Locale da_DK ISO8859-1.

Joomla doesn't accept Module-headingss in the perhaps more correct form
"ø"=ø "ü"=ü  so this is a catch 22 - it won't work to change
all content to this format (which, btw, would be a tremendous work effort).

I tried to report this on the gcalendar forum, but can't seem to post as
guest, nor obtain a user-ID at the site.  In the forum, though, a French
guy reports the same problem for French NLS chars.

What version are you using?
GCalendar: 2.0.0
joomla: 1.0.12
php: 5.2.6
mysql: 5.0.51
apache: 2.0.63
os: FreeBSD
Browser: IE, FF/Win, FF/Linux

Please provide the XML url and HTML url as well as your web site url.
http://www.supersquares.dk

Original issue reported on code.google.com by dieter.a...@gmail.com on 21 Dec 2008 at 11:36

GoogleCodeExporter commented 9 years ago
i don't know how this problem relates to mod_gcalendar_upcoming?? because it 
doesn't
change any language settings or something in this direction.... do you know 
what it is??

Original comment by allon.mo...@gmail.com on 21 Dec 2008 at 11:45

GoogleCodeExporter commented 9 years ago
Could this be because the stream itself does so?

I've been poking around in the module code, and there is a
RSSRequestObject.overrideMimeType('text/xml') - could this be the culprit?

/Hz

Original comment by dieter.a...@gmail.com on 21 Dec 2008 at 12:02

GoogleCodeExporter commented 9 years ago
If I click on one of the event entries to display the event, the problem doesn't
exist on the event display page.  So, definitely, it has to do with the module 
or the
RSS feed.

/Hz

Original comment by dieter.a...@gmail.com on 21 Dec 2008 at 12:04

GoogleCodeExporter commented 9 years ago
Maybe this is a SimplePie problem?  In mod_gcalendar_upcoming.php your comment 
is:
// Include SimplePie RSS Parser, supports utf-8 and international character 
sets in
newsfeeds
- does this mean utf-8 or does it mean utf-8 AS WELL AS e.g. iso-8859-1?

If you browse through simplepie.inc, there are a lot of references to UTF-8, 
which is
apparently always used internally in simplepie.inc.  3/4 through simplepie.inc 
there
is this statement:
function utf8_bad_replace($str)
...

Could it be that because of the 
"include_once('mod_gcalendar_upcoming/simplepie.inc')
that this actually sideeffects the whole site?  This would certainly be 
consistent
with the observations.  If so, mod_gcalendar_upcoming.php should de-register the
class when done.

If above is true, then I'll bet you 1:100 that your own site runs UTF-8, and, 
hence,
you have never encountered the problem...  :-)

/Hz

Original comment by dieter.a...@gmail.com on 21 Dec 2008 at 10:55

GoogleCodeExporter commented 9 years ago
Similar problem reported here:  
http://joomla.daveslist.co.nz/forum/viewtopic.php?f=2&t=42

/Hz

Original comment by dieter.a...@gmail.com on 21 Dec 2008 at 11:07

GoogleCodeExporter commented 9 years ago
it looks like that there is something wrong with simplepie..... and a 
configuration

Original comment by allon.mo...@gmail.com on 22 Dec 2008 at 9:44

GoogleCodeExporter commented 9 years ago
i think it is this call which makes errors in the helper class

$feed->handle_content_type();

Original comment by allon.mo...@gmail.com on 23 Dec 2008 at 7:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
try to add in the file 
modules/mod_gcalendar_upcoming/mod_gcalendar_upcoming.php at
line 61

$feed->set_output_encoding('ISO8859-1');

does it help??

Original comment by allon.mo...@gmail.com on 30 Dec 2008 at 9:02

GoogleCodeExporter commented 9 years ago
This was exactly what was needed!  

For a more permanent solution, maybe mod_gcalendar_upcoming.php can get the site
encoding automatically from the config file?

Thanks for this - much appreciated!

/Hz

Original comment by dieter.a...@gmail.com on 30 Dec 2008 at 11:38

GoogleCodeExporter commented 9 years ago
it is the _ISO variable
does this work as well??

$feed->set_output_encoding(_ISO);

Original comment by allon.mo...@gmail.com on 2 Jan 2009 at 6:09

GoogleCodeExporter commented 9 years ago
The suggestion does not work - the module writes the heading, but the content 
becomes
empty, i.e., the feed data does not show.

In the config.php file, it is the $mosConfig_locale setting.

/Hz

Original comment by dieter.a...@gmail.com on 2 Jan 2009 at 10:00

GoogleCodeExporter commented 9 years ago
comes in 2.0.1 bug fix release

Original comment by allon.mo...@gmail.com on 26 Jan 2009 at 3:51

GoogleCodeExporter commented 9 years ago
does this really work????? when i test it it breaks my whole output.....

Original comment by allon.mo...@gmail.com on 27 Jan 2009 at 1:53

GoogleCodeExporter commented 9 years ago
Ehm - does what work?  

My suggestion was for the module to fetch the locale setting from the 
config.php file
instead of manually overwriting the
modules/mod_gcalendar_upcoming/mod_gcalendar_upcoming.php at line 61 with
[$feed->set_output_encoding('ISO8859-1');] - or a quickie might be to have the 
locale
set through the admin interface.

/Hz

Original comment by dieter.a...@gmail.com on 28 Jan 2009 at 12:59

GoogleCodeExporter commented 9 years ago
$feed->set_output_encoding($mosConfig_locale); was not working... it was 
strange what
happened. i will do some more research about that.

Original comment by allon.mo...@gmail.com on 28 Jan 2009 at 2:26

GoogleCodeExporter commented 9 years ago

Original comment by allon.mo...@gmail.com on 28 Jan 2009 at 2:30

GoogleCodeExporter commented 9 years ago
After inserting the following
$feed->set_output_encoding('ISO8859-1');
on line 55 in mod_gcalendar_upcoming.php 
my german umlauts are shown correct.

Joomla 1.0.15,
gcalender 2.0.1

dd

Original comment by drdingsb...@googlemail.com on 11 Feb 2009 at 12:24

GoogleCodeExporter commented 9 years ago
and does this work
$feed->set_output_encoding($mosConfig_locale);
??

Original comment by allon.mo...@gmail.com on 12 Feb 2009 at 12:02

GoogleCodeExporter commented 9 years ago
Issue 119 has been merged into this issue.

Original comment by allon.mo...@gmail.com on 12 Mar 2009 at 11:42

GoogleCodeExporter commented 9 years ago
I just tried $feed->set_output_encoding('ISO8859-1'); on my site and it 
functions
correct.
Using $feed->set_output_encoding($mosConfig_locale);
 does not at all give the correct result, it makes the characters inside the upcoming
events worng also.

So, I stick to 'ISO8859-1' on line 61!

Original comment by kalen...@flsk.dk on 12 Mar 2009 at 3:35

GoogleCodeExporter commented 9 years ago
we are talking just about the upcoming

Original comment by allon.mo...@gmail.com on 19 Mar 2009 at 9:25

GoogleCodeExporter commented 9 years ago
i close this issue. i don't take action anymore on issues affecting joomla 
1.0.x web
sites and will not produce any more releases for joomla 1.0.x, there is a 
workaround
described here so everybody with joomla 1.0.x can fix it by himself

Original comment by allon.mo...@gmail.com on 19 Mar 2009 at 9:28