Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: UTF-8 decodes incorrectly in IE 6  (Read 14804 times)

0 Members and 1 Guest are viewing this topic.

ramones79

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
[Solved]: UTF-8 decodes incorrectly in IE 6
« on: July 17, 2008, 10:09:21 pm »

So the problem is simple:

I use Bulgarian language for my Coppermine Gallery. Version is:

SVN version info:
  Coppermine version: 1.4.18
  $Revision: 4380 $
  $LastChangedBy: gaugau $
  $Date: 2008-04-12 12:00:19 +0200 (Sa, 12 Apr 2008) $

The problem is with Internet Explorer 6 and it's bad behavior when decoding UTF-8 pages.
In FireFox 2 the page is great - everything is fine.
In Internet Explorer 6 - the page is in Bulgarian - and if I choose Encoding -> UTF-8 it becomes readable and ok. But IE 6 doesn't do that automatically and I dunno why.
When I load the gallery with IE 6 the default charset is set to Auto select /enabled/ and Western European /ISO/ selected.
I even tried to change the header /DOC TYPE definition/ of the template with the one from Joomla 1.5 where IE6 handles UTF-8 just great. But it still didn't worked. So I guess the problem is Coppermine-specific, perhaps something in the inside-settings.

I really hope you can help me.

I'm waiting for your reply,

with regards,
Ilia Penchev

P.S. Here is the Gallery: http://www.dani-din.com/cgallery/index.php
and this is the home page of the web site http://www.dani-din.com
« Last Edit: July 23, 2008, 12:25:03 pm by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: UTF-8 decodes incorrectly in IE 6
« Reply #1 on: July 18, 2008, 06:51:32 am »

Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml"
   xml:lang="bg-bg" lang="bg-bg" >
is nonsense, as Bulgarian is not part of the specification. That piece of code is not meant to specify the language of the content. Your custom theme is missing some vital aspects - edit http://www.dani-din.com/cgallery/themes/dani/template.html and replace
Code: [Select]
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
   xml:lang="bg-bg" lang="bg-bg" >
  <head>

<meta http-equiv="Pragma" content="no-cache" />
with
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
Don't make that stuff up - if you have no idea what it does and how much browsers rely on the correct headers, don't edit them.
Your page looks strange in Firefox as well btw, since your edits not only confuse IE, but every browser.
Logged

ramones79

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: UTF-8 decodes incorrectly in IE 6
« Reply #2 on: July 23, 2008, 11:02:28 am »

Hi and thank you for helping me.

I have changed the header as you say, but unfortunately it doesn't help :( In FireFox it is again OK and IE 6 can't set the automatic encoding to UTF-8 with this header.

About you saying that FireFox doesn't display the text correctly either - you're not right, or maybe my Firefox displays it OK because it's a bulgarian translated version, but it works.

Here are some screenshots, which maybe of some help to lead us to the problem:

Screenshot from Internet Explorer 6 - with the new header : http://www.topvisia.net/s01.jpg [Edit GauGau] Replaced hotlinked image with attachment s01.jpg [/Edit]
Screenshot from Firefox 2.0.0.16 with the new header: http://www.topvisia.net/s02.jpg [Edit GauGau] Replaced hotlinked image with attachment s02.jpg [/Edit]

The old header, which you say is not according to the specifications, actually its the header that Joomla 1.5 uses and pages with bulgarian text and this header are displaying correctly even in Internet Explorer 6, you can see that here:
screenshot IE6 and Joomla 1.5 - correctly decoding UTF-8: http://www.topvisia.net/s03.jpg [Edit GauGau] Replaced hotlinked image with attachment s03.jpg [/Edit]
the last screenshot is from http://www.martinakomers.com so you can see for yourself.

Hope this more information can help ?  ???
« Last Edit: July 23, 2008, 07:05:36 pm by Joachim Müller »
Logged

ramones79

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: UTF-8 decodes incorrectly in IE 6
« Reply #3 on: July 23, 2008, 11:07:54 am »

here are the links to the screenshots for better display:

IE 6 with new header http://www.topvisia.net/s01.jpg
Firefox with new header http://www.topvisia.net/s02.jpg
Joomla 1.5 with old header but displaying ok in IE6 http://www.topvisia.net/s03.jpg
Logged

Nibbler

  • Guest
Re: UTF-8 decodes incorrectly in IE 6
« Reply #4 on: July 23, 2008, 11:13:43 am »

Set Coppermine's encoding to UTF-8 in config.
Logged

ramones79

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: UTF-8 decodes incorrectly in IE 6
« Reply #5 on: July 23, 2008, 11:38:35 am »

Nibbler thank you man !

I am so stupid that I admit I'm the biggest no0b here  ;D

It works now PERFECTLY !!!! yeaaah :> You made me happy.

I can't believe how I didn't checked all config settings before changing headers, etc. Can't be true - I thought it is a much bigger problem (IE bugs, etc) :)

Hooray ! You have a drink on me, whenever you come to Bulgaria, I mean it ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: UTF-8 decodes incorrectly in IE 6
« Reply #6 on: July 23, 2008, 07:02:42 pm »

You must have messed with that setting, as coppermine uses utf-8 when it gets set up in the first place. You have caused all your issues because you messed with settings you shouldn't have messed with.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.