Norwegian language file - error in encoding? Norwegian language file - error in encoding?
 

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

Main Menu

Norwegian language file - error in encoding?

Started by andrez1, November 25, 2005, 02:45:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andrez1

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

Joachim Müller

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?

andrez1

Quote from: GauGau 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?


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



Joachim Müller


andrez1

Quote from: GauGau 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?

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.


Quote from: GauGau on November 25, 2005, 05:05:30 PM
what's you charset setting in your browser?

Automatic on both.



Mvh Andrez1

Nibbler

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

include/themes.inc.php

find


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


change to


    $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();

andrez1

Quote from: Nibbler on November 26, 2005, 11:33:44 PM

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


change to


    $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







Nibbler


andrez1

Quote from: Nibbler on November 27, 2005, 12:11:01 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

artistsinhawaii

Quote from: andrez1 on November 27, 2005, 12:35:31 AM

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


Davide Renda

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


artistsinhawaii

@Lontano

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

Dennis
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

Quote from: GauGau on November 28, 2005, 08:09:11 PM
@lontano: link?
sorry... forgot it...
www.daviderenda.com

user: test
password: password

Davide Renda

Quote from: madeinhawaii 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

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

Quote from: madeinhawaii on November 27, 2005, 08:14:04 PM
Quote from: andrez1 on November 27, 2005, 12:35:31 AM

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

seb123

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

Zenigata

Quote from: 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


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


change to


$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.


Zenigata

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

Please help me