| Author | Message |
| Post Title: Special caracters | |
jupiter4
Joined: Aug 08, 2005 Posts: 7
|
Posted: Thu Aug 11, 2005 8:38 pm
Hello,
I have integrated Gallery2 on my PHP Nuke Platinum 7.6 website. Almost all seems to be working fine. There is a little problem that begun when I have integrated the gallery. I'm portuguese, so my website as portuguese language as an option, in fact is the default language and portuguese language uses special caracters as ç é í à õ etc, etc. This caraters don't show up anymore. In their place, there is a small square. This is very anoying ... Is there a way to fix this? Anyone as any ideas ? Dari ? Thank you in advance PS: This is the website: http://lightcrew.net/website/index.php (I have already changed some in the navigation menu, using html code ) |
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 7:42 am
I have the same issue with my installation (Nuke 7.5, gallery 2RC1(build 34))
I had the same issue with Gallery2 beta4. I'm not sure if its a problem with Gallery itself or the integreation-package (actually, i do not know where to start looking). I have tried to change some basic stuff as the standard-language in Gallery to English but without any luck. Hope any of the gallery-guru's have any ideas, in the meantime i'll look for a solution myself. |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Tue Aug 16, 2005 9:20 am
in modules/gallery2/index.php look for:
$g2currentlang = $phpnuke2G2Lang[$currentlang]; and put echo $g2currentlang; after it to see if it outputs your proper language. |
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 10:58 am
It says "no"
So, yes the output is correct in that case (no=norwegian). |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Tue Aug 16, 2005 11:00 am
actually, i think i know the problem here. Gallery2 is a UTF-8 application, whereas phpnuke sends it's headers as ISO-8859-1.....
you can try to edit your phpnuke header file so that the ISO portion is replaced by UTF-8. |
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 11:18 am
Not sure if I understood you right.
Edit the ../language/'currentlang'.php ...? Code: › define("_CHARSET","ISO-8859-1");
to Code: › define("_CHARSET","UTF-8");
or...? |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Tue Aug 16, 2005 11:21 am
no i mean edit the header.php file of your phpnuke.
|
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 11:25 am
Hm ok...Guess there's some kind of differenses here.
This is the latest header.php [sourceforge.net] for nuke 7.5 and i can't find anything to edit... |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Tue Aug 16, 2005 11:33 am
add this line:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> |
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 11:39 am
Ok, we are talking about the same then
That meta-tag is defined in the language-file (../includes/meta.php gets it from the languagefile). Code: › define("_CHARSET","ISO-8859-1");
to Code: › define("_CHARSET","UTF-8");
Anyway, i've changed it to UTF-8 without any luck. Still showing up with the strange chars... |
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 11:59 am
I checked the encoding in my browser...both IE and Firefox reads the http://www.domain.com/modules.php?name=gallery2 as Unicode (UTF-
When I manually choose Western European (ISO) it shows up as it's supposed to, with all the special chars. Any idea how to solve this permanently? Is it just my site or is it every site with special characthers? |
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Tue Aug 16, 2005 12:13 pm
Ok, I'll do my research better next time
Seems to me alot of people has the same issue around the world and not only with php-nuke: http://gallery.menalto.com/index.php?na ... ic&t=33361 Pity the developers do not consider this issue as a "bug" or seem to be willing to fix or suggest any solutions to the problem that works. If I find anything that may work permanently, i'll let you guys know. Thanks for your time Dari, at least I got to try out some of the possibilities |
| Author | Message |
| Post Title: Re: Special caracters | |
jupiter4
Joined: Aug 08, 2005 Posts: 7
|
Posted: Wed Aug 17, 2005 2:42 am
Hello,
I have tried to add that code line to the nuke header.php. Didin't worked, in fact it got worse, I mean, this problem only happens when the gallery is showing, but with that code line added to the header file, the problem happens everytime in every page. So, for now, I'm just changing the nukes portuguese language files and replace all special caracters to html code. Thank you for your help guys. |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Aug 17, 2005 6:19 am
the problem is that Gallery2 is a UTF-8 application, and PHPNuke is ISO-8859-1. THe conflicting headers mangle the character sets. There's not much you can do about this other than change phpnuke's header to output UTF-8 as the charset.
|
| Author | Message |
| Post Title: Re: Special caracters | |
NoFantasy
Joined: May 01, 2005 Posts: 9
|
Posted: Wed Aug 17, 2005 2:46 pm
jupiter4 wrote: › ....and replace all special caracters to html code
This is what I did too. Probably the fastest way to fix this problem, in my case it took 15 minutes to change the necessary chars to html-code. I found the html-codes i needed at http://www.lookuptables.com/ (under the html-codes menu) if anyone else need to convert their special chars |
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Wed Aug 24, 2005 7:21 am
dari wrote: › the problem is that Gallery2 is a UTF-8 application, and PHPNuke is ISO-8859-1. THe conflicting headers mangle the character sets. There's not much you can do about this other than change phpnuke's header to output UTF-8 as the charset.
I changed lang-engish.php and lang-german.php to UTF-8 by changing to define("_CHARSET","UTF-8" ) . The behaviour didn't change. If I take at the look of the html-source by using my IE, it shows <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> in the head section. I was so hopefull that the workaround may work, it doesn't. Bye Frank PHP-NUKE 7.5 Gallery2 G2-PHOTOBLOCK |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Aug 24, 2005 7:31 am
try changing the encoding scheme at the top of:
nuke-root/language/lang-<yourlanguage>.php You will need to change: define("_CHARSET","ISO-8859-1"); to define("_CHARSET","UTF-8"); and in nuke-root/modules/Forums/language/lang-<yourlanguage>.php you'll have to do the same. |
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Wed Aug 24, 2005 7:40 am
dari wrote: › try changing the encoding scheme at the top of:
nuke-root/language/lang-<yourlanguage>.php You will need to change: define("_CHARSET","ISO-8859-1"); to define("_CHARSET","UTF-8"); and in nuke-root/modules/Forums/language/lang-<yourlanguage>.php you'll have to do the same. Hi dari, I changed in C:\srv\www\Nuke75\html\modules\Forums\language\lang-english.php C:\srv\www\Nuke75\html\language\lang-english.php C:\srv\www\Nuke75\html\language\lang-german.php Section of my language-file : /*define("_CHARSET","ISO-8859-1");*/ define("_CHARSET","UTF-8"); define("_SEARCH","Search"); and I had no sucess. This is the result in my NEWS Block in the middle of the page ---------------------------------------------------------------------- Willkommen ... ֠= OE Ġ= AE ߠ= SZ ܢel , Ħfeln User : gast Pw : gastuser ------------------------------------------------------------------------ The output is fine, when I remove the G2 Photoblock which shows random photos, from the webpage. |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Aug 24, 2005 7:59 am
you might want to google around for methods of fixing this. i don't know of any others off the top of my head, and since my site is all english, i can't really test it here. i'd also suggest getting a petition, or something like that, sent to the developer of phpnuke requesting that he change the default charset to UTF-8.
|
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Wed Aug 24, 2005 8:12 am
dari wrote: › sent to the developer of phpnuke requesting that he change the default charset to UTF-8.
Dari, thanks for your replies. The petition may be a good suggestion. I'll send them an email with my questions. Just a last sentence : The changes result is that this is now part of the htmlsource viewed by my IE : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Sitename </title> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <META HTTP-EQUIV="EXPIRES" CONTENT="0"> <META NAME="RESOURCE-TYPE" CONTENT="DOCUMENT"> <META NAME="DISTRIBUTION" CONTENT="GLOBAL"> <META NAME="AUTHOR" CONTENT="Sitename"> The codepage is now UTF-8 and the IE selected Unicode. I have to switch back in IE to Western to get my german special characters. Nevertheless - Dari, thanks for your support. |
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Wed Aug 24, 2005 8:46 am
Hi *
my next step is to convert the mySQL NUKE Database to UTF-8. This may be a hint: http://cpgnuke.com/FAQ/cat=14.html#52 |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Aug 24, 2005 9:06 am
please let us know if this works, this would make lots of people happy
|
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Thu Aug 25, 2005 1:25 am
Hi Dari,
I tested the databaseconversion of PHP-Nuke 7.5 last night. It seems to work. Let me have some more testing and I'll write a little summary about this in the evening. What I did : I changed some lang-files in PHP-NUKE. I created a new database with UTF-8 settings. I exported the old data into a sql skript. I converted the data with iconv.exe from latin to UTF-8. I created the new tables with contence by using the modified sql skript in the new database. What happened : I changed the collation of the database, but not for each table and imported the converted data. It works, but I am not shure if this way is ok. Has each table collation to be converted, too ? Bye Frank |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Aug 25, 2005 6:17 am
it's the best we've got so far...keep up the good work and keep us filled in
|
| Author | Message |
| Post Title: Re: Special characters (national characters) | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Thu Aug 25, 2005 6:37 am
dari wrote: › it's the best we've got so far...keep up the good work and keep us filled in
Hi dari, I finished my documentation with screenshots and would like to convert it to PDF. Is it possible to upload/host my document somewhere on this website |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Aug 25, 2005 6:39 am
actually, if you email it to me: dari AT nukedgallery DOT net, I can convert to PDF and post it up here if you'd like.
|
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Thu Aug 25, 2005 3:03 pm
dari wrote: › actually, ... post it up here if you'd like.
Hi, I finished my document and posted it to dari. I am very interested in the experiences of other users.... maybe a bit is missing or can be added to the description. You can download it from my homepage as well, but the line is slow and not very relieable. http://ulbrich.homelinux.com/modules.ph ... load&cid=3 (old version) |
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Mon Aug 29, 2005 2:23 am
Hello,
I did some more testings and found out, that this isn't a 100% solution. It is hard to say.... I have to go to Dragonfly (php-nuke version) or to copperfield. To be honest I am little bit disappointed. I need national Characters on my website. Maybe I have to change the characters in the language-files to UTF Code, too ? |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Aug 29, 2005 6:40 am
yes, the language files for phpnuke would have to be converted to UTF-8, as well.
|
| Author | Message |
| Post Title: Re: Special caracters | |
fulbrich
Joined: Aug 18, 2005 Posts: 28 Location: NRW/Germany
|
Posted: Wed Aug 31, 2005 1:12 am
dari wrote: › yes, the language files for phpnuke would have to be converted to UTF-8, as well.
Hi gari, I think everything is fine, now. I substituted all national characters ÄäÜö ... in the language-german.php files. There is now no problem anymore with displaying this characters with gallery2 embedded. I updated my howto and sent it to you with PM (version 1.3). Maybe you like to upload it to your site. |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Aug 31, 2005 7:48 pm
actually, i'll add it to the integration package
|
| Author | Message |
| Post Title: Re: Special caracters | |
xPatryk
Joined: Oct 30, 2005 Posts: 11
|
Posted: Wed Nov 09, 2005 3:04 am
Hi,
there is any posibility to convert Gallery2 to ISO-8859-2 ? I couldn't convert my php-nuke website, because it's too big, and I couldn't switch it off for a few days... Please, help me... Patryk, Poland |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Nov 09, 2005 3:44 pm
see your other post.
|
| Author | Message |
| Post Title: Re: Special caracters | |
anoopjohn
Joined: Mar 28, 2005 Posts: 10 Location: Hackensack, NJ
|
Posted: Mon Dec 12, 2005 10:21 pm
i have a gallery integrated with phpnuke. i have a work around for the utf-8 issue. the gallery module is running in single column layout - so no text from the phpnuke gets mangled. However when i included a the gallery imageblock in the site - some of the special characters in the pages started coming up funny. i did a simple workaround for this. thought i will share with all of you. I created a webservice for generating the image block and then in the image block code accessed the webservice
copy and save the following as block-Random_Image.php or whatever you want to name it and place inside blocks folder for the nuke. Code: ›
<?php /************************************************************************/ /* Random Image from Gallery 2 */ /* =========================== */ /* */ /* When you dont want to recreate the utf-8 converted nuke database */ /* you can use this with the createthumb webservice to handle the thumb */ /* creation without funny characters appearing on your nuke page */ /* */ /* Author: Anoop John */ /* http://www.zyxware.com */ /* */ /* This program is free software. You can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License. */ /************************************************************************/ if (eregi("block-Random_Image.php", $_SERVER['PHP_SELF'])) { Header("Location: index.html"); die(); } global $prefix, $db; $url="http://<your_nuke_url>/<createthumb_filename.php>"; $cobj=curl_init($url); curl_setopt($cobj,CURLOPT_RETURNTRANSFER,1); $content=curl_exec($cobj); curl_close($cobj); ?> now copy the following and place it in a file named <createthumb_filename.php> Code: ›
<?php /** * Gallery 2 webservice to create thumbnail without converting the nuke database * for handling the utf-8 issues. * @author Anoop John <http://www.zyxware.com> */ $blockType = "dailyImage"; $display = "none|date"; define("_G2_EMBED_PHP_FILE","embed.php"); define("_G2_CONFIGURATION_NOT_DONE","The module has not yet been configured."); include("modules/gallery2/gallery2.cfg"); if ($g2configurationdone != "true") { $content = _G2_CONFIGURATION_NOT_DONE; return; } require_once($g2embedparams['embedphpfile']."/"._G2_EMBED_PHP_FILE); $uid='admin'; $ret = GalleryEmbed::init(array( 'embedPath' => $g2embedparams['embedPath'], 'embedUri' => $g2embedparams['embedUri'], 'relativeG2Path' => $g2embedparams['relativeG2Path'], 'loginRedirect' => $g2embedparams['loginRedirect'], 'activeUserId' => "$uid", 'fullInit' => true)); $g2moddata = GalleryEmbed::handleRequest(); list($ret,$html, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$blockType, 'show'=>$display,'itemFrame'=>'solid','albumFrame'=>'solid')); if (!isset($g2moddata['isDone'])) { echo 'isDone is not defined, something very bad must have happened.'; exit; } if ($g2moddata['isDone']) { exit; } $content = $head."\n<center>".$html."</center>"; echo $content; ?> i am blindly setting the user as admin. perhaps there are security issues with this. dari perhaps you could extend this idea. anyway to reduce any security issues make sure you replace <createthumb_filename.php> with an obscure name and you should be pretty safe. Cheers Anoop www.zyxware.com [zyxware.com] |
| Author | Message |
| Post Title: Re: Special caracters | |
mk1200
Joined: Mar 01, 2006 Posts: 64
|
Posted: Wed Mar 08, 2006 8:47 pm
I gave Random_Image a shot, but I wasn't able to get any pics to show up in my block. Got any ideas?
|
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Mar 09, 2006 7:46 am
um, how is this related to the original topic in this post? you might want ot try enabling the imageblock module in g2.
|
| Author | Message |
| Post Title: Re: Special caracters | |
mk1200
Joined: Mar 01, 2006 Posts: 64
|
Posted: Thu Mar 09, 2006 8:36 am
I was replying to anoopjohn. I tried his 2 php files from above, but wasn't able to pull a pic into the block.
When I use the G2 ImageBlock I get ??? marks in my forums. I use Gallery2 without any side blocks in PHPNuke, so the Gallery pages are fine and don't mangle any other code. I only have the issue when I put the G2 block on the site. |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Thu Mar 09, 2006 8:59 am
the ???? are a result of g2 using utf-8 and phpnuke using the outdated iso-1889
|
| Author | Message |
| Post Title: Re: Special caracters | |
cpoint
Joined: Apr 01, 2006 Posts: 1
|
Posted: Sun Apr 02, 2006 11:00 am
Hi, i'm a newbie ...
for the right charaters change this line in HEADER.PHP $metastring = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="_charset"\">\n"; TO: $metastring = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n"; my phpnuke is 7.6 from EVO ... and this change give me the right characters. CU all CPOINT |
| Author | Message |
| Post Title: Re: Special caracters | |
dari
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Apr 03, 2006 7:34 am
you may also need to change the database collation to utf-8 as well.
|
| Author | Message |
| Post Title: Re: Special caracters | |
alien
Joined: Mar 06, 2006 Posts: 2
|
Posted: Tue Jun 27, 2006 11:57 am
Hello,
for users having troubles yet consider checking httpd.conf file from Apache and add this line if it not exist: AddCharset UTF-8 .utf8 Check too in this file if exist the line: AddDefaultCharset on and change to: AddDefaultCharset off I am converting my whole phpnuke ISO-8859-1 charset to UTF-8 reading HOWTO included in integration package and opening in ms notepad all lang-*.php language files and saving as... UTF-8 codification. I hope it can help someone. Can someone help me whith this [nukedgallery.net] issue? Excuse my english |
| Author | Message |
| Post Title: Re: Special caracters | |
Fr4n-FX
Joined: Jul 31, 2006 Posts: 2 Location: España
|
Posted: Tue Aug 01, 2006 3:50 pm
in a last nuke version works for me changing header charset.
then i create a condicion in meta.php of includes folder Code: › if ($module_name == "gallery2") {
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; } else { echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n"; } and in header.php declare var as global $module_name: function head() { global $slogan, $module_name, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle; sorry for my bad english |
| Author | Message |
| Post Title: Re: Special caracters | |
azmiii
Joined: Jan 15, 2008 Posts: 4
|
Posted: Mon Oct 27, 2008 9:16 am
dari wrote: › try changing the encoding scheme at the top of:
nuke-root/language/lang-<yourlanguage>.php You will need to change: define("_CHARSET","ISO-8859-1"); to define("_CHARSET","UTF-8"); thanks a lot türkçe karakter problemi olanlar bunu yapsa yeterli oluyor. bende şu an hatasız çalışıyor. 7.6+3.2 sistem |