forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: bugeyes on February 23, 2007, 02:55:02 pm

Title: Charset problems
Post by: bugeyes on February 23, 2007, 02:55:02 pm
Hi,

I've been using Coppermine 1.3.5 for over a year and all have been well.
I upgraded yesterday to 1.4.10 and it went well almost.

I have a problem with the charset utf-8 in conjunction with the rest of my site.
I'm in Sweden and the viewers are mostly from here too why I want the site to be in Swedish. This I can achive with utf-8 or the baltic language setting.

The problem with utf-8 is that I make use of the "anycontent.php" mechanism to add some custom content on the page. The swedish special chars will display as little squares in that section on the page.

When I use the baltic charset that section looks OK as well as all the text content that lives in the database. But text in menus and buttons will come out wrong.

I like to regain the possibility to have an easily maintained section at the top with free content. I have a news section and som picture links there, currently the links are down.

Advise what to do would be much appreciated.

Thank's in advance,
Bjorn

The site is here...  www.sorkin.se
Title: Re: Charset problems
Post by: bugeyes on February 23, 2007, 03:34:32 pm
Is it maybe possible to change the charset temporarily within anycontent.php?

It would be good to stay with utf-8 within coppermine itself.
Title: Re: Charset problems
Post by: Nibbler on February 23, 2007, 03:38:49 pm
Save anycontent.php as utf-8
Title: Re: Charset problems
Post by: bugeyes on February 23, 2007, 04:06:34 pm
Sorry, I need to ask how that is done.
I made it in notepad, what tool can save in different charsets?
Title: Re: Charset problems
Post by: Nibbler on February 23, 2007, 04:24:46 pm
I'm not familiar with windows software, sorry. Try searching the web or wait for someone else to drop by the thread.
Title: Re: Charset problems
Post by: bugeyes on February 23, 2007, 05:02:02 pm
Thank's anyway.

I'm considering to try to make some kind of wrapper in anycontent.php.
Like starting with a stylesheet that sets the charset and ending with one that sets it back to what it was. Between that an exit to an html document that can contain anything. Does anybody know if this is possible?
Title: Re: Charset problems
Post by: Nibbler on February 23, 2007, 05:03:52 pm
You can't change charset halfway through a file. If you really want to do it this way then you'd need to use an iframe. Recommended way is to save it in utf-8.
Title: Re: Charset problems
Post by: bugeyes on February 23, 2007, 05:07:39 pm
Yup, problem is that I'm using windows XP and can't find a program that can give me an option to save on different charsets. This is a game console OS if you ask me ;).

Thank's for letting me know that the charset can't be changed on the fly, prevented me from wasting more time on that.
Title: Re: Charset problems
Post by: Joachim Müller on February 23, 2007, 05:08:01 pm
notepad.exe is fine for your purposes - in the "save as..." dialog, you have an option to save the file as ANSI, Unicode, UnicodeBigEndian or UTF-8. Choose UTF-8 and you should be fine.
Title: Re: Charset problems
Post by: bugeyes on February 23, 2007, 10:56:03 pm
Thank's, it worked :)

I'm all UTF-8 now, some minor issues and the upgrade will be done.
Then I can start working on the real reason for the upfrade, find a working SPAM protection.

When I checked notepad earlier today at work it did not have the UTF-8 option, but that was on win 2000.