Charset problems Charset problems
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Charset problems

Started by bugeyes, February 23, 2007, 02:55:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bugeyes

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

bugeyes

Is it maybe possible to change the charset temporarily within anycontent.php?

It would be good to stay with utf-8 within coppermine itself.

Nibbler

Save anycontent.php as utf-8

bugeyes

Sorry, I need to ask how that is done.
I made it in notepad, what tool can save in different charsets?

Nibbler

I'm not familiar with windows software, sorry. Try searching the web or wait for someone else to drop by the thread.

bugeyes

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?

Nibbler

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.

bugeyes

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.

Joachim Müller

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.

bugeyes

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.