March 20, 2010, 07:31:03 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Private messages disabled
Caused by the massive abuse of the PM system in the past, the sending of personal messages has been disabled for all regular users on the Coppermine forum.
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: [Solved]: UTF-8 decodes incorrectly in IE 6  (Read 4087 times)
0 Members and 1 Guest are viewing this topic.
ramones79 Topic starter
Coppermine newbie

Posts: 4


« on: July 17, 2008, 09: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, 11:25:03 am by Nibbler » Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 46240


aka "GauGau"


WWW
« Reply #1 on: July 18, 2008, 05:51:32 am »

Code:
<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:
<?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:
<!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 Topic starter
Coppermine newbie

Posts: 4


« Reply #2 on: July 23, 2008, 10:02:28 am »

Hi and thank you for helping me.

I have changed the header as you say, but unfortunately it doesn't help Sad 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 ?  Huh


* s01.jpg (190.44 KB, 1024x768 - viewed 262 times.)

* s02.jpg (174.92 KB, 1024x768 - viewed 193 times.)

* s03.jpg (249.54 KB, 1024x768 - viewed 194 times.)
« Last Edit: July 23, 2008, 06:05:36 pm by Joachim Müller » Logged
ramones79 Topic starter
Coppermine newbie

Posts: 4


« Reply #3 on: July 23, 2008, 10: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
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19610



WWW
« Reply #4 on: July 23, 2008, 10:13:43 am »

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

I don't care about what they say, I won't live or die that way.
ramones79 Topic starter
Coppermine newbie

Posts: 4


« Reply #5 on: July 23, 2008, 10:38:35 am »

Nibbler thank you man !

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

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) Smiley

Hooray ! You have a drink on me, whenever you come to Bulgaria, I mean it Wink
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 46240


aka "GauGau"


WWW
« Reply #6 on: July 23, 2008, 06: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
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.065 seconds with 18 queries.