Advanced search  

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

Pages: [1]   Go Down

Author Topic: Problems with charset when there's no album where the user is allowed to upload  (Read 3072 times)

0 Members and 1 Guest are viewing this topic.

fillo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Hi, I´ve set up my cpg gallery in spanish, and all the things are right except when I get an expected error.
(like when there is no album where the user is allowed to upload to).

This is the code for my home page:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="mssmarttagspreventparsing" content="true" />
<title>Galeria Peña El Puntal - Inicio</title>
<link rel="stylesheet" href="themes/elpuntal/style_cpg.css" type="text/css" />
<link rel="stylesheet" href="themes/elpuntal/style_wp.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>
<div id="container">
<ul id="navigation">
<!-- BEGIN home -->
                                            <li><a href="index.php" title="Ir a la página principal">Inicio</a></li>
<!-- END home -->
<!-- BEGIN my_profile -->
                                            <li><a href="profile.php?op=edit_profile" title="Mi perfil">Mi perfil</a></li>
<!-- END my_profile -->
<!-- BEGIN faq -->
                                            <li><a href="faq.php" title="Preguntas frecuentes sobre la galería de imágenes &quot;Coppermine&quot;">FAQ</a></li>

As you can see charset is iso-8859-1 and especial characters like ñ are correctly shown.

If I try to upload files without permission I get an expected error but the page is not correctly shown.

And this, upload´s page code:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="mssmarttagspreventparsing" content="true" />
<title>Galeria Peña El Puntal - Error</title>

<link rel="stylesheet" href="themes/elpuntal/style_cpg.css" type="text/css" />
<link rel="stylesheet" href="themes/elpuntal/style_wp.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body>

<div id="container">
<ul id="navigation">
<!-- BEGIN home -->
                                            <li><a href="index.php" title="Ir a la página principal">Inicio</a></li>
<!-- END home -->
<!-- BEGIN my_profile -->
                                            <li><a href="profile.php?op=edit_profile" title="Mi perfil">Mi perfil</a></li>
<!-- END my_profile -->
<!-- BEGIN faq -->
                                            <li><a href="faq.php" title="Preguntas frecuentes sobre la galería de imágenes &quot;Coppermine&quot;">FAQ</a></li>
<!-- END faq -->

Charset is also iso-8859-1 but I can´t see "ñ" or "í"

I solved a similar problem with the email functions using "utf8_decode" I´ve tried this in this case inside cpg_die function with no success.

Anyone with similar problems? Any idea?

Thanks
« Last Edit: October 29, 2007, 01:16:36 pm by Nibbler »
Logged

Nibbler

  • Guest

Post a link to your gallery.
Logged

fillo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Post a link to your gallery.

Here is http://elpuntalvillalpando.es/coppermine/index.php

user: tester
pass: tester123

If you want to reproduce the error, login and then try to upload a file. "AÑADIR FICHERO"
This is an expected error, this is not the problem. Look to the "AÑADIR FICHERO" link and all the links on the left menu.
I think this is a character´s encoding problem. I try to solve it using "utf8_decode" in "function cpg_die(...)" but as you can see
this works only for the message. (You can see the words "ningún" and "esté" correctly written in the error´s body.

This also occurs if you try to change your password and you use wrong original password or don´t fill the boxes.

MI PERFIL -> "Cambiar mi contraseña"

In this case you can see correctly the "ñ" character in error´s body. Notice that it is possible because I put "utf8_decode" in "function cpg_die(...)".

Code: [Select]
        $params = array(
                '{MESSAGE}' => utf8_decode($msg_text),
                '{FILE_TXT}' => $lang_cpg_die['file'],
                '{FILE}' => $error_file,
                '{LINE_TXT}' => $lang_cpg_die['line'],
                '{LINE}' => $error_line,
                '{OUTPUT_BUFFER}' => $ob,
        );

I don´t understand what happens, why these pages change?
Logged

Nibbler

  • Guest

Change your character set from iso-8859-1 to UTF-8 in config.

Logged

fillo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Damm!!!! What a fool I am!!!

I was trying changes for string´s conversion in different places instead of try to change in one place for all the strings  :-[

Sorry and thank you.

But I still don´t understand why with iso-8859-1 it works for main pages and it doesn´t work for these error pages.

Once again thank you.
Logged

fillo

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Change your character set from iso-8859-1 to UTF-8 in config.

I forgot to quote you :D
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.