CuteNews

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> No åäö on addnews and editnews anymore?
NHLKOLLEN
post Apr 2 2012, 12:28 PM
Post #1


Newbie
*

Group: Members
Posts: 36
Joined: 4-March 12
Member No.: 75,431



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 åäö... 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.

This post has been edited by NHLKOLLEN: Apr 2 2012, 07:16 PM
Go to the top of the page
 
+Quote Post
Support_Team
post Apr 3 2012, 06:45 AM
Post #2


Advanced Member
***

Group: Admin
Posts: 435
Joined: 17-January 12
Member No.: 74,486



Dear User!

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


--------------------
Best regards,

Support_Team
Go to the top of the page
 
+Quote Post
NHLKOLLEN
post Apr 3 2012, 08:42 AM
Post #3


Newbie
*

Group: Members
Posts: 36
Joined: 4-March 12
Member No.: 75,431



QUOTE (Support_Team @ Apr 3 2012, 06:45 AM) *
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?

This post has been edited by NHLKOLLEN: Apr 3 2012, 09:21 AM
Go to the top of the page
 
+Quote Post
Ifa
post Apr 3 2012, 07:27 PM
Post #4


Weirdo
***

Group: Support
Posts: 2,217
Joined: 4-October 04
From: Finland
Member No.: 1,254



You could try the php version, see if it works

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


--------------------
Too weird to live, too rare to die...
There is only two things in this world that I trust. Me and my cock.
Two things are infinite: the universe and the human stupidity; and I'm not sure about the universe.
- Albert Einstein, after Hiroshima
I may have invented Control-Alt-Delete, but Bill made it famous
The biggest security holes are often so small that no one ever notices them.

If ya have a problem with my new kick ass signature, I don't care. It's just how I roll baby! [lkj was here, ninja-style]
Go to the top of the page
 
+Quote Post
Filou83
post Apr 4 2012, 06:37 PM
Post #5


Advanced Member
***

Group: Members
Posts: 161
Joined: 14-October 09
From: Germany
Member No.: 32,006



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


--------------------
Regards from Germany :D
Personal website: http://mb-wallpaper.de
Go to the top of the page
 
+Quote Post
NHLKOLLEN
post Apr 4 2012, 09:05 PM
Post #6


Newbie
*

Group: Members
Posts: 36
Joined: 4-March 12
Member No.: 75,431



QUOTE (Ifa @ Apr 3 2012, 07:27 PM) *
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.
Go to the top of the page
 
+Quote Post
Ifa
post Apr 5 2012, 01:06 AM
Post #7


Weirdo
***

Group: Support
Posts: 2,217
Joined: 4-October 04
From: Finland
Member No.: 1,254



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

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

Perhaps something like this would work:

CODE
<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 biggrin.gif


--------------------
Too weird to live, too rare to die...
There is only two things in this world that I trust. Me and my cock.
Two things are infinite: the universe and the human stupidity; and I'm not sure about the universe.
- Albert Einstein, after Hiroshima
I may have invented Control-Alt-Delete, but Bill made it famous
The biggest security holes are often so small that no one ever notices them.

If ya have a problem with my new kick ass signature, I don't care. It's just how I roll baby! [lkj was here, ninja-style]
Go to the top of the page
 
+Quote Post
NHLKOLLEN
post Apr 5 2012, 07:12 AM
Post #8


Newbie
*

Group: Members
Posts: 36
Joined: 4-March 12
Member No.: 75,431



QUOTE (Ifa @ Apr 5 2012, 01:06 AM) *
Well, in javascript, å ä ö would be u00E5 u00E4 u00F6

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

Perhaps something like this would work:

CODE
<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 biggrin.gif


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

This post has been edited by NHLKOLLEN: Apr 5 2012, 08:05 AM
Go to the top of the page
 
+Quote Post
rosedai
post Oct 5 2012, 09:12 AM
Post #9


Newbie
*

Group: Members
Posts: 1
Joined: 5-October 12
Member No.: 80,740



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.
Go to the top of the page
 
+Quote Post
James Donovan
post Oct 5 2012, 03:29 PM
Post #10


Newbie
*

Group: Members
Posts: 22
Joined: 17-September 12
Member No.: 80,108



QUOTE (NHLKOLLEN @ Apr 3 2012, 08:42 AM) *
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.


--------------------
how to start online shop
Go to the top of the page
 
+Quote Post
Support_Team
post Oct 10 2012, 11:18 AM
Post #11


Advanced Member
***

Group: Admin
Posts: 435
Joined: 17-January 12
Member No.: 74,486



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,

Support_Team
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 31st July 2014 - 09:36 PM