Page 1 of 2

åäö?

Posted: Tue Jan 08, 2008 1:02 pm
by izzlik
hello, my swedish characters åäö shows up as questions marks on serendipity, why is this ? :/

Re: åäö?

Posted: Tue Jan 08, 2008 2:56 pm
by garvinhicking
Hi!

Because you either have a wrong charset, or your database server has wrong collations or your browser interprets them false or your serendipity's charset is not enabled to match the database, or you have not enable the option "use db charset conversion" in the s9y configuration.

If you give us more details about your environment, I can be more precise.

Regards,
Garvin

Posted: Wed Jan 09, 2008 2:32 am
by izzlik
hey, it works when i turned of Enable DB-charset conversion :)

However, the calender still shows ? for åäö, do you know why?

also, i have another question

with Wich plugin can i set tags for every Blogg post?

Posted: Wed Jan 09, 2008 12:00 pm
by garvinhicking
Hi!

However, the calender still shows ? for åäö, do you know why?
The calendar output happens with a system called "locale". If you use "de" for example, your server must have the "de_DE.UTF8" locale.
with Wich plugin can i set tags for every Blogg post?
The "freetag" plugin, serendipity_event_freetag, available via spartacus.

Regards,
Garvin

Posted: Wed Jan 09, 2008 4:25 pm
by izzlik
2 last questions that i just noticed... when people write a comment on my entries there webpages are displayed as " gotoSite(); " is this correct or is anyting wrong and if it is, what ?

and when i enter a blogg entry, the name of my blogg is replaced with the name of the blogg entry, can this be changed so it wont ?

Posted: Thu Jan 10, 2008 12:09 am
by garvinhicking
Hi!

"Gotosite()" does not sound proper. It might be your template, or a plugin. Can you show your URL so that I can have a look at it?
and when i enter a blogg entry, the name of my blogg is replaced with the name of the blogg entry, can this be changed so it wont ?
You can change that by editing the index.tpl template file of your template, and changing the place where "serendipity_banner" is emitted. There you can replace $head_title with $blogTitle if you do not want to have entry titles in your HTML header.

Regards,
Garvin

Posted: Thu Jan 10, 2008 12:36 am
by izzlik
here is the url... http://rizzler.se just check the comments of the first entry and you can se it.

also

i contacted my server provider wich has confirmed twice that "The locale de_DE.UTF8 is already enabled on the server" and yes it looks like this for me at the callender http://img84.imageshack.us/img84/4161/cpki0.jpg

i also noted that the ? becomes small Square's in IE7 and not "?" like in firefox.

Posted: Thu Jan 10, 2008 12:53 am
by garvinhicking
Hi!
izzlik wrote:here is the url... http://rizzler.se just check the comments of the first entry and you can se it.
Ah. This is a feature of the template you're using. The designer thought that a good notation to use instead of calling it "Link to Homepage". You can edit that in the comments.tpl template file.
i contacted my server provider wich has confirmed twice that "The locale de_DE.UTF8 is already enabled on the server" and yes it looks like this for me at the callender http://img84.imageshack.us/img84/4161/cpki0.jpg
It's not de_DE.UTF8, I gave that as an example. For swedish it's something different, I don't know that. Like sv_SE.UTF8 or something else!

Regards,
Garvin

Posted: Thu Jan 10, 2008 8:41 am
by izzlik
this is what my server provider said now

We have dec8_swedish_ci collation character sets for swedish. Let us know the url where you are getting errors so that we can investigate it further.

so can it really be becuase of that ?

Posted: Thu Jan 10, 2008 10:25 am
by garvinhicking
Hi!

The actual swedish utf8 local name is one of:

sv_SV.UTF8, sv_SV.UTF-8, sv_SE.UTF8, sv_SE.UTF-8

Regards,
Garvin

Posted: Thu Jan 10, 2008 4:14 pm
by izzlik
Hello again, i talked to my server provider who enabled all the charsets you named above, after i had cleared my cache i still se åäö for the callender as ? :(

Posted: Thu Jan 10, 2008 4:49 pm
by garvinhicking
Hi!

Save the following code as "test.php" in your s9y directory and call it via HTTP (http://rizzler.se/test.php):

Code: Select all

<?php
header('Content-Type: text/html; charset=UTF-8');
@define('DATE_LOCALES', 'sv_SV.UTF8, sv_SV.UTF-8, swedish, sv, sv_SV, sv_SE.UTF8, sv_SE.UTF-8, sv_SE');

if (defined('DATE_LOCALES')) {
    $locales = explode(',', DATE_LOCALES);
    foreach ($locales as $locale) {
        $locale = trim($locale);
        if (setlocale(LC_TIME, $locale) == $locale) {
            echo "Using $locale!<br />\n";
            break;
        }
    }
}

echo "Last locale: $locale<br />\n";

for ($i = 0; $i <= 7; $i++) {
  $ts = mktime(0, 0, 0, 1, $i, 2008);
  echo strftime('%A', $ts) . "<br />\n";
}
Regards,
Garvin

Posted: Thu Jan 10, 2008 5:21 pm
by izzlik
this is what i got...
Using swedish!
Last locale: swedish
m�ndag
tisdag
onsdag
torsdag
fredag
l�rdag
s�ndag
m�ndag

Posted: Thu Jan 10, 2008 10:23 pm
by garvinhicking
Hi!

Show that output to your provider, it means that the "sv_SV.UTF8" locale is not installed.. If others are, you can edit the file lang/UTF-8/serendipity_lang_se.inc.php and change the order ofthe DATE_LOCALES to something like this:

Code: Select all

@define('DATE_LOCALES', 'sv_SV.UTF8, sv_SV.UTF-8, sv_SE.UTF8, sv_SE.UTF-8');
HTH,
Garvin

Posted: Fri Jan 11, 2008 3:30 am
by izzlik
hey, my provider answered and said
We have checked the code and found that the swedish character set sv_SV.utf8 is specified there. I did replace the code with sv_SE.utf8 and it is working fine now . You can verify this by accessing the URL:http://rizzler.se/test1.php . Please check this now and let me know if you need any help.
i tryed to add sv_SE.utf8 to serendipity_lang_se.inc.php so it looks like this @define('DATE_LOCALES', 'sv_SE.UTF8, sv_SE.UTF-8, swedish, sv, sv_SE, sv_SE.UTF8, sv_SE.UTF-8, sv_SE');

but that didint help.

the code for test1.php is

Code: Select all

<?php
header('Content-Type: text/html; charset=UTF-8');
@define('DATE_LOCALES', 'sv_SE.UTF8, sv_SE.UTF-8, swedish, sv, sv_SE, sv_SE.UTF8, sv_SE.UTF-8, sv_SE');

if (defined('DATE_LOCALES')) {
    $locales = explode(',', DATE_LOCALES);
    foreach ($locales as $locale) {
        $locale = trim($locale);
        if (setlocale(LC_TIME, $locale) == $locale) {
            echo "Using $locale!<br />\n";
            break;
        }
    }
}

echo "Last locale: $locale<br />\n";

for ($i = 0; $i <= 7; $i++) {
  $ts = mktime(0, 0, 0, 1, $i, 2008);
  echo strftime('%A', $ts) . "<br />\n";
}