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] 2   Go Down

Author Topic: Norwegian language file - error in encoding?  (Read 50917 times)

0 Members and 1 Guest are viewing this topic.

andrez1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Hedmarksmuseets fotoarkiv - Museum archive
Norwegian language file - error in encoding?
« on: November 25, 2005, 02:45:21 am »

Hello.

Installed cpg142 from fresh zip and use of Norwegian language file produce strange caracters.

If I open the norwegian.php in an editor (textpad 4.5 for windows) the file turns up as 'PC, UTF-8'

If i save that file whith  'ANSI' encoding everything is fine. It then turn up as 'PC, ANSI'. 

I guess that is the solution, but not sure on UTF-8 - stuff.

 
Mvh Andrez1
« Last Edit: November 27, 2005, 12:11:13 am by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Norwegian language file - error in encoding?
« Reply #1 on: November 25, 2005, 09:27:47 am »

my guess is that you haven't set your browser correctly, you have to enable unicode (utf-8) or automatic selection. Hard to say without a link to your page. However, modifying the language file as you did might be a solution for you. Does the demo look as expected for you?
Logged

andrez1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Hedmarksmuseets fotoarkiv - Museum archive
Re: Norwegian language file - error in encoding?
« Reply #2 on: November 25, 2005, 01:31:33 pm »

my guess is that you haven't set your browser correctly, you have to enable unicode (utf-8) or automatic selection. Hard to say without a link to your page. However, modifying the language file as you did might be a solution for you. Does the demo look as expected for you?


Demo is OK. very nice.

I also tested with opera 8.0 and Internet explorer 6.20, (on local install with danish and norwegian language files) is the solution to get a new/updated browser or? Any setting to try?

Mvh Andrez1


Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Norwegian language file - error in encoding?
« Reply #3 on: November 25, 2005, 05:05:30 pm »

what's you charset setting in your browser?
Logged

andrez1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Hedmarksmuseets fotoarkiv - Museum archive
Re: Norwegian language file - error in encoding?
« Reply #4 on: November 26, 2005, 11:17:54 pm »

my guess is that you haven't set your browser correctly, you have to enable unicode (utf-8) or automatic selection. Hard to say without a link to your page. However, modifying the language file as you did might be a solution for you. Does the demo look as expected for you?

I try again.

Your norwegian demo-page display OK in Opera 8.0 and encoding set to 'automatic selection'.

Your norwegian demo-page display OK in IE6.20 and encoding set to 'automatic selection'.

But not on similar pages served from local machine.

What is different is web-server. I belive this is not a browser issue.  

I guess I have to look at server settings in apache and php on the local server.

I get "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />" on both local and your demo-pages.

I guess the browser gets information from web-server about content encoding, not only by reading html-page. If it only was by reading html-pages; it would not be an issue as the pages are identical.

Pages displayed with error in encoding - saved to disk - opened again - display OK.



coppermine from 1.32 - 1.35 have behaved very well on language, served from apache-php-mysql package  Xampp
http://www.apachefriends.org/ windows -version.

1.4 have never worked properly on (norwegian) language and the xampp package.   So this is maybe a windows-apache-php problem.


what's you charset setting in your browser?

Automatic on both.



Mvh Andrez1
Logged

Nibbler

  • Guest
Re: Norwegian language file - error in encoding?
« Reply #5 on: November 26, 2005, 11:33:44 pm »

We already fixed this error, looks like it got lost somewhere along the line.

include/themes.inc.php

find

Code: [Select]
    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    user_save_profile();

change to

Code: [Select]
    $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];
    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    header("Content-Type: text/html; charset=$charset");
    user_save_profile();
Logged

andrez1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Hedmarksmuseets fotoarkiv - Museum archive
Re: Norwegian language file - error in encoding?
« Reply #6 on: November 27, 2005, 12:05:57 am »

Code: [Select]
    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    user_save_profile();

change to

Code: [Select]
    $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];
    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
    header("Content-Type: text/html; charset=$charset");
    user_save_profile();


Much better. It now display norwegian characters automatically.

But I am stuck with them, can not change back to english or other language...  If I go to configuration, I can not change language..


Mvh Andrez1






 
Logged

Nibbler

  • Guest
Re: Norwegian language file - error in encoding?
« Reply #7 on: November 27, 2005, 12:11:01 am »

Clear your cookies. Marking as fixed.
Logged

andrez1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Hedmarksmuseets fotoarkiv - Museum archive
Re: Norwegian language file - error in encoding?
« Reply #8 on: November 27, 2005, 12:35:31 am »

Clear your cookies. Marking as fixed.


Done that. On both browsers.

Going to configuration menu to change language does not help, when updating; language does not change.

But going to the same menu allowing language list; update; go language list in main page and changing that; works.


So i think the fix produced another problem.


Mvh Andrez1
 
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Norwegian language file - error in encoding?
« Reply #9 on: November 27, 2005, 08:14:04 pm »


Going to configuration menu to change language does not help, when updating; language does not change.
But going to the same menu allowing language list; update; go language list in main page and changing that; works.
So i think the fix produced another problem.
Mvh Andrez1
 

Andrez,
Try logging out.  Leave your site, clear your cookies and then return to your site, log back in, and set the default language.   It happened to me once before, but this cleared it up.

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

FOUINE95

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Norwegian language file - error in encoding?
« Reply #10 on: November 27, 2005, 09:13:05 pm »

Tahnk you for this "hack" it run for me :)
Logged

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: Norwegian language file - error in encoding?
« Reply #11 on: November 28, 2005, 07:44:03 pm »

It doesn't work for me. It's in french and all "é" and "è" are shown as "?" and "�"
I've used this hack, but still no change. When running charsetmgr no change either.
Any idea?

PS. there's also a similar thread in the French board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Norwegian language file - error in encoding?
« Reply #12 on: November 28, 2005, 08:09:11 pm »

@lontano: link?
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Norwegian language file - error in encoding?
« Reply #13 on: November 28, 2005, 09:15:59 pm »

@Lontano

What is your setting for "Character encoding" in Config?  That should remain at the recommended UTF8 setting.

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: Norwegian language file - error in encoding?
« Reply #14 on: November 28, 2005, 09:20:11 pm »

@lontano: link?
sorry... forgot it...
www.daviderenda.com

user: test
password: password

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: Norwegian language file - error in encoding?
« Reply #15 on: November 28, 2005, 09:23:32 pm »

@Lontano

What is your setting for "Character encoding" in Config?  That should remain at the recommended UTF8 setting.

Dennis

Left as UTF8. I've tried changing to local encoding, but no result either.
I've also checked settings on my Firefox and everything is set to UTF8 too

andrez1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
    • Hedmarksmuseets fotoarkiv - Museum archive
Re: Norwegian language file - error in encoding?
« Reply #16 on: November 28, 2005, 09:30:10 pm »


Going to configuration menu to change language does not help, when updating; language does not change.
But going to the same menu allowing language list; update; go language list in main page and changing that; works.
So i think the fix produced another problem.
Mvh Andrez1
 

Andrez,
Try logging out.  Leave your site, clear your cookies and then return to your site, log back in, and set the default language.   It happened to me once before, but this cleared it up.

Dennis

Hello

I'v been clearing a lot of cokies since last..

I now belive the problem have two parts.

Whatever can be set and stored i cokies as language preference based on list-box on frontside: Works OK. With or without nibblers fix.

But changing, as admin, in 'configuration'-menu, language: Does not work. Broken with nibblers fix. (A fix which works ok on how utf-8 is displayed.)

The place to check if the 'cpg140_config' -table change the 'name' "lang" to 'value' "english" (or whatever chosen) or not when requested.

I would like to set language to norwegian and remove listbox and language-flags on frontpage. And i can not do that from config meny as long as the database not gets the message  'name' "lang" to 'value' "norwegian"

I can edit the database, thats so...


Mvh Andrez1
Logged

seb123

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Norwegian language file - error in encoding?
« Reply #17 on: November 29, 2005, 09:04:22 pm »

I made the changes, but not every caracter is displayed correcly. The ë is displayed correcly, but é is not! language dutch and utf-8
Logged

Zenigata

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Il sito di Zenigata
Re: Norwegian language file - error in encoding?
« Reply #18 on: November 29, 2005, 09:56:58 pm »

We already fixed this error, looks like it got lost somewhere along the line.

include/themes.inc.php

find

Code: [Select]
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
 user_save_profile();

change to

Code: [Select]
$charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];
 header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
 header("Content-Type: text/html; charset=$charset");
 user_save_profile();

Hi,
I've made the changes but it doesn't works! I've checked it with Firefox 1.0 and IE 6.0. Cpg 1.3.5, insted, works ok.

Logged

Zenigata

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Il sito di Zenigata
Re: Norwegian language file - error in encoding?
« Reply #19 on: November 30, 2005, 03:29:27 pm »

I've tried even with Firefox 1.5 but I stall have problems with à è ì ò ù, displayed as ù

Please help me
Logged
Pages: [1] 2   Go Up
 

Page created in 0.03 seconds with 19 queries.