forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: andrez1 on November 25, 2005, 02:45:21 am

Title: Norwegian language file - error in encoding?
Post by: andrez1 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
Title: Re: Norwegian language file - error in encoding?
Post by: Joachim Mller 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 (http://coppermine-gallery.net/demo/cpg14x/index.php?lang=norwegian) look as expected for you?
Title: Re: Norwegian language file - error in encoding?
Post by: andrez1 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 (http://coppermine-gallery.net/demo/cpg14x/index.php?lang=norwegian) 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


Title: Re: Norwegian language file - error in encoding?
Post by: Joachim Mller on November 25, 2005, 05:05:30 pm
what's you charset setting in your browser?
Title: Re: Norwegian language file - error in encoding?
Post by: andrez1 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 (http://coppermine-gallery.net/demo/cpg14x/index.php?lang=norwegian) 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
Title: Re: Norwegian language file - error in encoding?
Post by: Nibbler 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();
Title: Re: Norwegian language file - error in encoding?
Post by: andrez1 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






 
Title: Re: Norwegian language file - error in encoding?
Post by: Nibbler on November 27, 2005, 12:11:01 am
Clear your cookies. Marking as fixed.
Title: Re: Norwegian language file - error in encoding?
Post by: andrez1 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
 
Title: Re: Norwegian language file - error in encoding?
Post by: artistsinhawaii 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
Title: Re: Norwegian language file - error in encoding?
Post by: FOUINE95 on November 27, 2005, 09:13:05 pm
Tahnk you for this "hack" it run for me :)
Title: Re: Norwegian language file - error in encoding?
Post by: Davide Renda 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
Title: Re: Norwegian language file - error in encoding?
Post by: Joachim Mller on November 28, 2005, 08:09:11 pm
@lontano: link?
Title: Re: Norwegian language file - error in encoding?
Post by: artistsinhawaii 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
Title: Re: Norwegian language file - error in encoding?
Post by: Davide Renda on November 28, 2005, 09:20:11 pm
@lontano: link?
sorry... forgot it...
www.daviderenda.com

user: test
password: password
Title: Re: Norwegian language file - error in encoding?
Post by: Davide Renda 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
Title: Re: Norwegian language file - error in encoding?
Post by: andrez1 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
Title: Re: Norwegian language file - error in encoding?
Post by: seb123 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
Title: Re: Norwegian language file - error in encoding?
Post by: Zenigata 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.

Title: Re: Norwegian language file - error in encoding?
Post by: Zenigata 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
Title: Re: Norwegian language file - error in encoding?
Post by: Joachim Mller on November 30, 2005, 07:33:25 pm
this is the bugs board, there's no support here. Don't expect help that soon, we're working on this issue. If you need help and want to fix this faster, post details like a link to your site, a hardcopy of the language section of coppermine's config, a hardcopy of your browser's charset/encoding settings.
Title: Re: Norwegian language file - error in encoding?
Post by: Zenigata on November 30, 2005, 11:27:15 pm
Hi GauGau, you can access my test gallery at http://area51.zenigata.it/cpg142/cpg142/index.php

I have errors with language Italiano and Italiano2 and Firefox is set to western charset encoding (ISO8859-1).

You can also access my production gallery (with no errors and italiano language file) at: http://forum.zenigata.it/galleria/index.php


I hope you will find a solution to this bug.

Good work. :)
Title: Re: Norwegian language file - error in encoding?
Post by: ganesh on December 01, 2005, 03:57:23 pm
Same thing here... plus other problems...
http://www.gospel.bo.it/ (http://www.gospel.bo.it/)  ;)
Title: Re: Norwegian language file - error in encoding?
Post by: andrez1 on December 01, 2005, 07:23:06 pm
I've tried even with Firefox 1.5 but I stall have problems with , displayed as ù


Hi GauGau, you can access my test gallery at http://area51.zenigata.it/cpg142/cpg142/index.php

I have errors with language Italiano and Italiano2 and Firefox is set to western charset encoding (ISO8859-1).


Dont know firefox, but can you set it to automatic on encoding?

I have visited your test-site. It display Norwegian perfect. But your Italian is crappy ;)

Automatic encoding in browser.

When i open the norwegian.php in an text-editor (textpad 4.5.0 abel to se what encoding, and to save in that encoding) it opens as
'PC, utf-8'. What i se is straigtforward readable norwegian.

When i open the italian.php in an text-editor (textpad 4.5.0 abel to se what encoding, and to save in that encoding) it opens as
'PC, utf-8'. What i se is messed up italian. A lot of .

When i open the italian2.php in an text-editor (textpad 4.5.0 abel to se what encoding, and to save in that encoding) it opens as
'PC, utf-8'. What i se is messed up italian. A lot of .

Maybe there exist a italian language file which can be saved properly... If not:

I guess the manual solution is to have someone familiar with italian to open the two language files in an editor as the one mentioned, and look for the next , change it, and be sure to save the file as utf-8 on exit.

The '' often come as an 'è' or 'é' , some variants. Do a search and repalce on the different variant, be sure all '' you dont want is translated.

Mvh Andrez1









Title: Re: Norwegian language file - error in encoding?
Post by: TuXi on December 20, 2005, 05:33:43 pm
Sitting here with my Swedish.php and anycontent.php and it wont work for me.. the fix wont work. i've tester all files forwards and backwards many times now. changed encoding to utf-8 and back to iso-8859-1. i've cleared the cookies.. tried in Firefox and Internet explorer... nothing works.... really sad. i really want to fix this!

i have realised that the version 1.3.5 works perfect with swedish and anycontent... but in the 1.4.2 i just get a lots of "??" everywhere...

i've posted my problems here anyway: http://forum.coppermine-gallery.net/index.php?topic=25296.0

//Joachim


Edit: YES!! It's working now.. :)
Title: Re: Norwegian language file - error in encoding?
Post by: pbgirl69 on May 30, 2006, 10:50:45 pm
Quote
Posted by: TuXi 
Insert Quote
Sitting here with my Swedish.php and anycontent.php and it wont work for me.. the fix wont work. i've tester all files forwards and backwards many times now. changed encoding to utf-8 and back to iso-8859-1. i've cleared the cookies.. tried in Firefox and Internet explorer... nothing works.... really sad. i really want to fix this!

i have realised that the version 1.3.5 works perfect with swedish and anycontent... but in the 1.4.2 i just get a lots of "??" everywhere...

i've posted my problems here anyway: http://forum.coppermine-gallery.net/index.php?topic=25296.0

//Joachim


Edit: YES!! It's working now.. 

TuXi - what did you do?  I have gotten most of the gallery to show the correct charcters in Swedish but still have problems with them in Catagories. 

MVH
Ami
Title: Re: Norwegian language file - error in encoding?
Post by: Joachim Mller on May 31, 2006, 08:14:28 am
This is not a support thread. Locking!