Topic: Problem with UTF-8 encoding

I have a problem encoding special characters of UTF-8 (serbian latin, like: čćđš etc...) all i get are question marks, i'm using meta tag for utf-8 and utf-8 encoding in newssimple.

I can see serbian characters within page, but not in newssimple.

What might be a problem?

Re: Problem with UTF-8 encoding

What version are you using? Do you have a link to your website?


http://www.kgb-hq.com/FrontEnd/index.php?s...;#disqus_thread
That's the link, as you can see, our marks are in question mark...

Version is 1.5.3.

Thanks

Re: Problem with UTF-8 encoding

With IE9 I don't get any news shown there... Just the information that I do require a new FlashPlayer version. In FF it's working.

For your problem - it seems that you are using strange codes. I saved your website locally and inserted in the h1 tag the following symbols:

äöü ß ä Đđ Ä‘


And all characters are shown up correctly. I found some strange character html-entities, I don't know what character this one should be: &#65533.
How do you replace the characters? Try to change the CuteNews configuration option $matches[1] to disabled and add another article with special characters.

You should also check the html conformity of your website, for example you are defining three times the <html> tag...


Silly me, i haven't seen 3 html tags, deleted 2 and now it's working.

Thanks!

4 (edited by 2014-08-24 11:51:45)

Re: Problem with UTF-8 encoding

I have the same problem only with comments (news are displayed correctly), it looks like ".handle_img_tag($matches[1].$matches[3], false)."
čćšđž
".handle_img_tag($matches[1].$matches[3], false)."

A few days ago I've upgraded from 1.4.6 to 2.0.2 and this is the only problem I have with the new version. This is acctually my second try to upgrade and configure things, first time I had other problems, but not this one. Both times on the same site. 

I hope, there is a solution for this problem and I don't have to try once more all from beginning. ".handle_img_tag($matches[1].$matches[3], false)."

In Settings : on my webpage and in CN : UTF-8
In General settings in CN I've tried all combinations: disable/enable Convert UTF8 symbols for comments, disable/enable pop up for comments etc, but it looks allways like on my image above.

Grateful for any help...

5 (edited by 2014-08-24 15:13:36)

Re: Problem with UTF-8 encoding

And now, I am not sure why, only comments in popup form display caracters uncorrectly like on my image above. When I post comments direct from the news page, it is all OK.
Is it possible that the changes I make in settings were not immediately displayed but after a time ago.
Slow server?

Does anyone have any idea how to solve this problem with PopUP caracters displaying?

Re: Problem with UTF-8 encoding

Dear skitnica,

Which encoding did you use in the comments in version 1.4.6? Did you indicate this encoding during migration?

Best regards,
CN Support team

7 (edited by 2014-08-26 10:55:52)

Re: Problem with UTF-8 encoding

Thanks for your respond.

I remember only I' ve done it for news. It was encoding Windows -1250/2 (The both 0 and 2 had good display in test)
Is there any way to do this  separately for comments?
However, untill the problem is solved, I gave up PUPUPs and caracters in comments are  OK.

Re: Problem with UTF-8 encoding

Thanks for your respond.

I remember only I' ve done it for news. It was encoding Windows -1250/2 (The both 0 and 2 had good display in test)
Is there any way to do this  separately for comments?
However, untill the problem is solved, I gave up PUPUPs and caracters in comments are  OK.

Please check what code your browser automatically identifies in the Pop-up window with comments. If it's not UTF-8, you need to check in Dashboard > Templates > Print whether there's the <meta> tag in the template, and if it's not there you need to add the <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> tag in the head template section.

If that won't help you can use another way. In the version 1.4 comments, as well as news, were kept in a separate file. You can encode the file to UTF-8 using third-party software and migrate the news to version 2.0.2 again. It might solve the problem with comments.
You will need to encode the following files: data/comments.txt, data/news.txt, data/postponded_news.txt, unapproved_news.txt.
Then you need to use UTF-8 when migrating. Before that you need to check whether the files were encoded successfully and characters are not corrupted.

Best regards,
CN Support team