Running TinyButStrong
3 posts
• Page 1 of 1
Running TinyButStrong
Hi,
Just a word to say I am making some simple tests with the TinyutStrong framework.
The only trouble I have are the files encoding, when saved with Visual Studio. They have BOM, and TBS don't handle them.
So to detect and remove the BOM, I render the template using this piece of code :
Just a word to say I am making some simple tests with the TinyutStrong framework.
The only trouble I have are the files encoding, when saved with Visual Studio. They have BOM, and TBS don't handle them.
So to detect and remove the BOM, I render the template using this piece of code :
- Code: Select all
$tbs->Show(TBS_NOTHING);
$html = $tbs->Source;
$bom = chr(0xEF).chr(0xBB).chr(0xBF);
if(strlen($html) >= strlen($bom))
{
if(substr($html, 0, strlen($bom)) == $bom)
{
$html = substr($html, strlen($bom));
}
}
- MaitreDede
- Posts: 29
- Joined: May 22nd, 2012, 7:17 am
Re: Running TinyButStrong
You can also setup VisualStudio to not save BOM?
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Running TinyButStrong
I don't think. The only wayI know to save files without BOM is to "Save as..." and select encoding and BOM options. But I have to do it for each file.
I haven't found yet the magic option to do this.
I haven't found yet the magic option to do this.
- MaitreDede
- Posts: 29
- Joined: May 22nd, 2012, 7:17 am
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 12 guests