• Welcome to Simple Machines Community Forum. Please login or sign up.

Help Needed From Character Encoding Expert

Started by j_jindal1, August 01, 2020, 09:31:29 AM

Previous topic - Next topic


Need expert advice on the issue below...

I'm trying to display SMF posts on wordpress page... For english characters all works well, but things are messed up with non-english characters like regional languages...

See the post on WP page here...


Actual post in SMF


P.S. Installation of SMF and WP is on same DB and collation is also same now ("utf8_general_ci"), initially WP tables collation was "utf8mb4_unicode_520_ci" and SMF tables was "utf8_general_ci"

I've already tried...
changing database collation from utf8_general_ci to utf8mb4_unicode_520_ci and vice versa... converting imported post to UTF-8 using encode_utf and decode_utf php functions...

mb_convert_encoding with diff charsets on imported data but results were not good.. :(

Plz help guys....
www.ShayarFamily.com Shayri forum of Friends


www.ShayarFamily.com Shayri forum of Friends


August 02, 2020, 03:07:54 PM #2 Last Edit: August 02, 2020, 03:41:42 PM by shawnb61
It looks like your SMF site is properly dealing with UTF8, but your wp site is not. 

You may need to turn to WP support? 

A quick search reveals others have had similar issues.  Some of their suggested solutions look dodgy to me, but then again, I dunno WP:

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp


Thanks for your reply.

I'm checking those links if it works... :)
www.ShayarFamily.com Shayri forum of Friends


What did you do to get the SMF content into WP exactly?
No good deed goes unpunished
All helpful urges should be circumvented


Quote from: Arantor on August 04, 2020, 08:26:10 AM
What did you do to get the SMF content into WP exactly?
Thanks for replying, I somewhat fixed it but still need help with other issue.

I was fetching the data using smc functions. This is what I did in an addon php script.

1.  require ("smf_installation/SSI.php");
2.  $smcFunc['db_query']
3.  while ($row = $smcFunc['db_fetch_assoc']($result))

Since the above steps didn't' give correct results, I used $WPDB object of wordpress to fetch data... Now there are no more special characters. But the issue is "data is being printed with BBCODES".

[ size=15pt][ color=brown]अपनी मधहोश निगाहो से सवेरा करना[ /size][ /color]

instead of [ size=15pt][ color=brown] I want appropriate html tags. Could you please guide..
www.ShayarFamily.com Shayri forum of Friends


Thanks Arantor, Thanks shawnb61 for taking time to reply in this thread. The issue is resolved now.

For anyone else facing similar issue... the solution is fetching the raw data from database and then using parse_bbc function.
www.ShayarFamily.com Shayri forum of Friends