|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
zoezoe Smarty n00b
Joined: 18 Jan 2016 Posts: 2
|
Posted: Mon Jan 18, 2016 10:03 am Post subject: UTF-8 unrecognised character |
|
|
Good morning,
I am new to developing and to using smarty.
I have a random character in my database which my smarty template does not recognise. The character is in the middle of the intended output, the output is not displayed and messes up the template from the point where the output should be displayed. The character is ’
I have used php's mb_detect_encoding and it says its UTF - 8.
Does anyone know if there is any way to get this character to display?
*update to original question
I have found that the first time the variable is output nothing appears but the data does appear on subsequent outputs?
Last edited by zoezoe on Mon Jan 18, 2016 3:30 pm; edited 1 time in total |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Jan 18, 2016 1:23 pm Post subject: |
|
|
mb_detect_encoding is not fool-proof.
But your issue is irrelevant to it.
If your database contains wrong characters, that means you're not using tright encoding to connect to it, which means, your problem is outside Smarty. |
|
Back to top |
|
zoezoe Smarty n00b
Joined: 18 Jan 2016 Posts: 2
|
Posted: Mon Jan 18, 2016 4:43 pm Post subject: |
|
|
After some help I have discovered that the character is definitely UTF - 8 it's (0xe28099), right single quotation mark.
After further investigation I have discovered that:
* with the above character the variable shows on all outputs apart from the first output.
* without the above character the variable shows on all outputs.
I would greatly appreciate it if anyone could help me with this. Thanks |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Jan 20, 2016 8:13 am Post subject: |
|
|
That just can't be true.
And without seeing your full code it is not possible to tell what you are doing wrong. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|