Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

createPost() help

Aloittaja OChaos, kesäkuu 25, 2014, 12:51:16 AP

« edellinen - seuraava »

OChaos

I run a website where people can select a beer they are drinking and click on it to automatically post to the forum that they're drinking it.

I am using the createPost() function to accomplish this, but I am running into a formatting issue on some posts where special characters are involved.

Here is an example

I am clicking on a beer called "14° ESB", when the function is called to post it to my forum it's changing the degrees symbol (°) , I have it printing the $msgOptions array in the function (this one has the subject/body etc...)
createPost($msgOptions, $topicOptions, $posterOptions);   

When it prints before saving, it looks as expected, but once it is processed by the function, it's changing it to look like in the attachment.

I've made sure the meta tag is set for UTF-8 encoding on the forum, for the table in the DB and for the body column in the smf_messages table.

I am not sure what to do at this point, all the data is populated from DB data in my app, so there's no user entered data that needs to be extra scrubbed.  Any thoughts on how to proceed?

ETA: added attachment  :-[

kat

Lainaus käyttäjältä: OChaos - kesäkuu 25, 2014, 12:51:16 APit's changing it to look like in the attachment.

I'm so glad that I'm not the only one who forgets to add the attachment... ;)

OChaos

Oops, added it to the original post  :o

OChaos


Arantor

So is the forum UTF-8? Is the content you're trying to add UTF-8?
Holder of controversial views, all of which my own.


Advertisement: