1 (edited by 2012-04-02 19:16:56)

Topic: No åäö on addnews and editnews anymore?

UPDATE:
It seems to be problem with whole cutenewsfolder with åäö. Instead of åäö, it shows a "�"...
Then on top of my first post this shows: 

I've read some about it, and seems to be the functions.inc.php file that makes the .
I know when looked around in the files i save the file in wrong Encoding... It showed a warning but i just clicked yes, after that there was this problem. Only problem is, when I'm saving functions.inc.php in others Encoding it makes other problems with åäö... http://cutephp.com/forum/style_emoticons/default/sad.gif

When I saw the problem for the first time, i looked into the functions.inc.php file and found this:

    '�' => '”',
    '�' => '“',
    '�' => 'œ',
    '�' => '™',
    '�' => '’',
    '�' => '‘',
    '�' => '‰',
    '�' => '…',
    '�' => '€',
    '�' => '¡',
    '�' => '¢',
    '�' => '£',
    '�' => '¤',
    '�' => '¥',
    '�' => '¦',
    '�' => '§',
    '�' => '¨',
    '�' => '©',
    '�' => 'ª',
    '�' => '«',
    '�' => '¬',
    '�' => '­',
    '�' => '®',
    '�' => '¯',
    '�' => '°',
    '�' => '±',
    '�' => '²',
    '�' => '³',
    '�' => '´',
    '�' => '·',
    '�' => '¸',
    '�' => '¹',
    '�' => 'º',
    '�' => '»',
    '�' => '¼',
    '�' => '½',
    '�' => '¾',
    '�' => '¿',




Then I googled around and found and replaced it with this:
    '”' => '”',
    '“' => '“',
    'Å“' => 'œ',
    'â„¢' => '™',
    '’' => '’',
    '‘' => '‘',
    '‰' => '‰',
    '…' => '…',
    '€' => '€',
    '¡' => '¡',
    '¢' => '¢',
    '£' => '£',
    '¤' => '¤',
    'Â¥' => '¥',
    '¦' => '¦',
    '§' => '§',
    '¨' => '¨',
    '©' => '©',
    'ª' => 'ª',
    '«' => '«',
    '¬' => '¬',
    '­' => '­',
    '®' => '®',
    '¯' => '¯',
    '°' => '°',
    '±' => '±',
    '²' => '²',
    '³' => '³',
    '´' => '´',
    'µ' => 'µ',
    '¶' => '¶',
    '·' => '·',
    '¸' => '¸',
    '¹' => '¹',
    'º' => 'º',
    '¼' => '¼',
    '½' => '½',
    '¾' => '¾',
    '¿' => '¿',
    'À' => 'À',
    'Á' => 'Á',
    'Â' => 'Â',
    'Ã' => 'Ã',
    'Ä' => 'Ä',
    'Ã…' => 'Å',
    'Æ' => 'Æ',
    'Ç' => 'Ç',
    'È' => 'È',
    'É' => 'É',
    'Ê' => 'Ê',
    'Ë' => 'Ë',
    'ÃŒ' => 'Ì',
    'Í' => 'Í',
    'ÃŽ' => 'Î',
    'Ï' => 'Ï',
    'Ð' => 'Ð',
    'Ñ' => 'Ñ',
    'Ã’' => 'Ò',
    'Ó' => 'Ó',
    'Ô' => 'Ô',
    'Õ' => 'Õ',
    'Ö' => 'Ö',
    '×' => '×',
    'Ø' => 'Ø',
    'Ù' => 'Ù',
    'Ú' => 'Ú',
    'Û' => 'Û',
    'Ãœ' => 'Ü',
    'Ý' => 'Ý',
    'Þ' => 'Þ',
    'ß' => 'ß',
    'à' => 'à',
    'á' => 'á',
    'â' => 'â',
    'ã' => 'ã',
    'ä' => 'ä',
    'Ã¥' => 'å',
    'æ' => 'æ',
    'ç' => 'ç',
    'è' => 'è',
    'é' => 'é',
    'ê' => 'ê',
    'ë' => 'ë',
    'ì' => 'ì',
    'í' => 'í',
    'î' => 'î',
    'ï' => 'ï',
    'ð' => 'ð',
    'ñ' => 'ñ',
    'ò' => 'ò',
    'ó' => 'ó',
    'ô' => 'ô',
    'õ' => 'õ',
    'ö' => 'ö',
    '÷' => '÷',
    'ø' => 'ø',
    'ù' => 'ù',
    'ú' => 'ú',
    'û' => 'û',
    'ü' => 'ü',
    'ý' => 'ý',
    'þ' => 'þ',
    'ÿ' => 'ÿ',

Which makes it works for now (not the javascript title, or åäö in admin-section)
If I paste     '�' => '”', code agian, it makes it all look wierd agian.

Originaltext
Hi! I was playing around in the addnews and editnews files and maybe some more. Anyway... Now, I don't have åäö in the titles anymore in addnews and editnews. Åäö is shown when the news get posted.

Check here:
http://www.nhlkollen.se

BUT
If you go into an article like this one which contains åäö in the title:
http://nhlkollen.se/index.php?subaction=sh...amp;ucat=3&

you will see that åäö isnt in the browser title anymore. Im using javascript to chance the title.

What can I have made wrong?
Sorry for a maybe confusing post but I'm in a hurry right now.

Re: No åäö on addnews and editnews anymore?

Dear User!

Please try adding the "åäö" symbols, not the replacing functions directly to the title.

Best regards,
CN Support team

3 (edited by 2012-04-03 09:21:00)

Re: No åäö on addnews and editnews anymore?

Dear User!

Please try adding the "åäö" symbols, not the replacing functions directly to the title.

EDIT: Ok, so I fixed åäö problem on the admin-section now, and on the index... But I still the title still gets wrong.
Here how I do it...

In my template, I go to full story and in full story I do this:
<script language="javascript">
document.title = "NHLKOLLEN.SE - {title}";
</script>

But If the title includes åäö it's get wrong. Any idea?

4 (edited by 2012-04-03 19:27:31)

Re: No åäö on addnews and editnews anymore?

You could try the php version, see if it works

http://cutephp.com/forum/index.php?showtopic=31743

Re: No åäö on addnews and editnews anymore?

You could also give UTF-8 CuteNews a try:
http://cutephp.com/forum/index.php?showtopic=32324

Re: No åäö on addnews and editnews anymore?

You could try the php version, see if it works

http://cutephp.com/forum/index.php?showtopic=31743

Thanks, but that didn't help. It made the website alot slower for some reason and åäö still didn't work.

7 (edited by 2012-04-05 01:18:27)

Re: No åäö on addnews and editnews anymore?

Well, in javascript, å ä ö would be \u00E5 \u00E4 \u00F6

http://rishida.net/tools/conversion/

Perhaps something like this would work:

<script type="text/javascript">
var title="{title}";
title.replace("Ã¥", "\u00E5");
title.replace("ä", "\u00E4");
title.replace("ö", "\u00F6");
document.title = title;
</script>

been some time since I last coded javascript, so there might be some errors... And I'm not sure how the chars (åäö) are in the {title}, or if it works at all http://cutephp.com/forum/style_emoticons/default/biggrin.gif

8 (edited by 2012-04-05 08:05:54)

Re: No åäö on addnews and editnews anymore?

Well, in javascript, å ä ö would be u00E5 u00E4 u00F6

http://rishida.net/tools/conversion/

Perhaps something like this would work:

<script type="text/javascript">
var title="{title}";
title.replace("Ã¥", "u00E5");
title.replace("ä", "u00E4");
title.replace("ö", "u00F6");
document.title = title;
</script>

been some time since I last coded javascript, so there might be some errors... And I'm not sure how the chars (åäö) are in the {title}, or if it works at all http://cutephp.com/forum/style_emoticons/default/biggrin.gif

Thanks, but didn't work either hmm
It says &aring instead of å for example.

9 (edited by 2012-10-10 06:55:52)

Re: No åäö on addnews and editnews anymore?

help me with that if i create for You admin account to english version of my site? I'm too dumb... Thanks if you agree to help me.

Re: No åäö on addnews and editnews anymore?

EDIT: Ok, so I fixed åäö problem on the admin-section now, and on the index... But I still the title still gets wrong.
Here how I do it...

In my template, I go to full story and in full story I do this:
<script language="javascript">
document.title = "NHLKOLLEN.SE - {title}";
</script>

But If the title includes åäö it's get wrong. Any idea?



No, I don't have any idea regarding this. But one of my friend is a developer and he told me that this problem is quite common.

Re: No åäö on addnews and editnews anymore?

To solve the problem with UTF8 symbols  you need to change the code in the following files
./core/init.php https://raw.github.com/CuteNews/cute-news-r...s/core/init.php
inc/options.php https://raw.github.com/CuteNews/cute-news-r...inc/options.php

It's better to download the latest build from github https://github.com/CuteNews/cute-news-repo/downloads

Best regards,
CN Support team