vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help with wrong characters being displayed (https://vborg.vbsupport.ru/showthread.php?t=316942)

Paddy Murphy 02-08-2015 08:10 PM

I'm using;

Code:

{feed:content:encoded}

Click here to read the full story...

For the Body Template.

I should point out that's not just feeds I having this issue with. Since I changed the HTML Character Set to UTF-8 from ISO-8859-1 it is also effecting usernames that contain a ?

See - http://www.forum.norml.ie/member.php?11

The username should be Ois?n Mac Giolla Bhr?de but it is being displayed as Ois�n Mac Giolla Bhr�de

kh99 02-08-2015 08:28 PM

OK, well, the only problem I saw in that feed is "It& # 39;s" that's supposed to be "It's". But when I look at the feed xml I see this:
Code:

It's time to reconsider the regulation of marijuana and <b>hemp</b>.
An if you imagine decoding the characters, the &lt;b&gt;hemp&lt;/b&gt; later in the line becomes <b>hemp</b>, which correctly makes the word hemp bold in the post. But if you decode It&amp;#39;s you get It& # 39;s, which is what you see in the post. So it seems to me it's a problem in the feed, and I don't really see a solution to it (well, except maybe if you hacked the code to decode the post twice, but I'm not sure that wouldn't cause other issues).

Edit: BTW, I added some spaces in the above to prevent the codes from being interpreted.

Paddy Murphy 02-08-2015 08:48 PM

I was able to fix the apostrophe issue with a replacement variable - https://vborg.vbsupport.ru/external/2015/02/16.jpg

I don't mind the bold words so much. It's the ? & ? characters being displayed as boxes that I'd like to sort out.

kh99 02-08-2015 09:30 PM

Oh, OK, sorry. I remember seeing something earlier about replacement variables but I didn't pay enough attention.

I looked in to the other issue a little when you posted on vbulletin.com and I found that the feed seemed to be an ISO-8859-1 encoded document, with an xml tag that said it was UTF-8, and I think the rss feed poster code wasn't prepared to handle that. I would look in to it more but I didn't see those chars in the feed I was looking at.

Lynne 02-08-2015 10:32 PM

Try changing this in your config.php file and uncomment this line.

PHP Code:

// $config['Mysqli']['charset'] = 'utf8'; 

so it looks like:
PHP Code:

$config['Mysqli']['charset'] = 'utf8'


Paddy Murphy 02-13-2015 10:59 PM

ozzy47, kh99 & Lynne thank you very much for your help with this issue.

I'm not sure why but for the last 4/5 days everything seems to be running smoothly. Maybe the database took a day or two to recognise the that the tables were changed to utf8_general_ci. So feeds are good.

The characters in the usernames were ok after I edited them from the box to the correct character.

Thanks again :)

ozzy47 02-14-2015 12:30 AM

Well glad to hear all is well now. :)


All times are GMT. The time now is 03:16 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02767 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete