DMXzone Database Connector PHP Support Product Page

Answered

Unicode / HTML Database Output - Repeat Region Difference?

Asked 08 Feb 2017 11:44:19
1
has this question
08 Feb 2017 11:44:19 Dave Sturgeon posted:
I have a database connection that is outputting written content to my site. Some of this copy has Unicode and HTML characters within it.

I’ve found that if I add this data to my page within a repeating region (wrapped in the generated div tag, with id etc.) these characters display correctly. If I add the data without a repeating wrapping div (ie. just {{----}} ) it displays the content as plain text with no formatting.

For example:
‘£00.00’ will display correctly as £00.00 within a repeating region, but as ‘£00.00’ outside of one.

My PHP page character set is UTF-8 and the SQL database collation is utf8_general_ci throughout. The issue only occurs outside of a repeating region, which I assume is related to the id and html reference the wrapping div tag applies with it?

Does anyone know how I also apply this to single data inserts - if, this in fact why I’m seeing this issue?

Thanks in advance, any relevant advice is much appreciated.

Replies

Replied 08 Feb 2017 11:48:06
08 Feb 2017 11:48:06 Teodor Kuduschiev replied:
Hello Dave,
If you have a HTML code stored in your database, you should always bind it as HTML on the page, if you want the HTML code to be rendered properly.
It is not related to the repeat region - it is the type dropdown, on the left side of the Bind button:

Replied 08 Feb 2017 11:56:49
08 Feb 2017 11:56:49 Dave Sturgeon replied:
Thanks for the quick answer Teoder, that seems very likely to be where I'm going wrong.

I'll give it a go - thanks again.

Reply to this topic