Hi,
I would like to use some polish characters in `$conf['gallery_title']`,
but zp-config.php is ANSI default, so when I use łóąśćżźć in gallery title
my browser shows only (*&(*&% in the titlebar
I also use polish chars for album titles and they work fine,
either below the album thums or in the titlebar.
Do you think that converting zp-config.php from ANSI to UTF-8 could solve this problem?
Comments
For now though, converting the zp-config.php to UTF-8 file might work... or if you have the php iconv or Multi-byte encoding libraries, you could do a conversion just on those strings. Either way, as long as you set the character set parameter to UTF-8 in zp-config.php it should work fine...
Btw, thanks for a great albumscript.
I added polish letter to the gallery title and I can see it on titlebar now
For editing text files (php, html ...) I use notepad2
http://www.flos-freeware.ch/notepad2.html which has a lot of useful features,
like for example changing encoding from ANSI to UTF-8
ZP is Godsend
When I make the admin interface for options, I'll be sure to store strings as UTF-8 in the database.
Instead of Šimunić Antun, it says Šimuni& #263; Antun. The site is complete and I want to bring it online, but I can't because of this minor glitch. Just to mention - zenphoto 1.0.5 worked just fine for me.
Here's an example: http://www.umjetnici.com/index.php
As I said before, there is no problem with letter ć in "album description" or anywhere else on the site, just in "album title".
I had no such problem in version 1.0.5. I just updated it to 1.0.8.2. Maybe if I downgrade again?
Basically what's happening is that the ampersand (&) in the entity output for the ć is being encoded itself! So the string is doubly-encoded, which simply reveals all the & symbols.
Now, like I asked before, and I'll ask it clearer this time:
How and where are you entering the album title? Is it through AJAX form? Was it only on the initial upload? Is it in the album edit screen? I need to know where to look.
Also, as far as I know, Zenphoto _never_ converts characters to their entity forms, so is there any way that the form 'ć' could have been entered there? Are you using some kind of automatic entity plugin or something?
Try updating the title through the AJAX edit (just click it on the album page). Also try in the admin edit screen if you haven't already. If that doesn't work, look at lines 237 and 240 of `template-functions.php` and delete the `htmlspecialchars(` and the closing `)` end paren. That should work for you now while I track down where that encoded entity is coming from...
Now to try to help find the bug, here are some answers you requested:
I'm entering the album title in administration. I go to: "Edit titles, descriptions, and other metadata" > click on the name of the album to edit it > write Antun Šimunić in "Album Title".
I don't understand what you want to ask me with "Was it only on the initial upload". Actually I uploaded folder with images via FTP client and it name was "antun_simunic".
To answer your second question, I never entered 'ć' there. I even never saw this entity form before and I don't even know what entity plugin means :-)
Only thing I used was your CMS zenphoto and Firefox. That's all :-)
And I have to say, you do excellent work with zenphoto. Keep up the good work!
I removed 'htmlspecialchars()' on lines 438 & 441 of 'template-functions.php' and it fixed the problem.
I'm still not seeing this behavior on any of my installations... those entities should not be there! Very strange.
Oh, would you please submit a new ticket for this at http://www.zenphoto.org/trac/newticket ? Thanks!
In administration I'm trying to put ć into "album name" and it works, but on the frontend it spells 'ć' instead ć. There is no difference if I'm putting 'ć' or ć, there is a same outcome.
Erasing 'htmlspecialchars()' on some lines in 'template-functions.php' helped. I also tried updating title through the Ajax, but it didn't work, the name was erased and the text "Click to add a title..." appeared. Is it possible that Ajax don't work in Firefox? I also tried updating title (through Ajax) in IE7 but it won't let me enter letters š or ć.
I'm entering the album title in administration. I go to: "Edit titles, descriptions, and other metadata" > click on the name of the album to edit it > write Antun Šimunić in "Album Title".
Would you be so kind and do it for me?