[PHP] Figuring out file-encoding

2011-02-28 Thread Asmann, Roland
Hi all, I need to read several files from the HD, but they are saved in different encodings. Can I somehow figure out which encoding I should use when reading the file? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-2

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
Sorry people for not replying over the list... On 27-11-10 20:08, Daniel P. Brown wrote: > On Sat, Nov 27, 2010 at 14:05, Daniel P. Brown > wrote: > > On Sat, Nov 27, 2010 at 13:55, Asmann, Roland > wrote: > >> > >> $s = preg_replace("/\[i\]((\s|.)+?)\[

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
On 27-11-10 18:44, Asmann, Roland wrote: > On 27-11-10 17:24, Daniel P. Brown wrote: > > On Sat, Nov 27, 2010 at 08:57, Asmann, Roland > > wrote: > > > Hi all, > > > > > > I am playing around with PHP and BBCodes and have found some regex's >

Re: [PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
On 27-11-10 17:24, Daniel P. Brown wrote: > On Sat, Nov 27, 2010 at 08:57, Asmann, Roland > wrote: > > Hi all, > > > > I am playing around with PHP and BBCodes and have found some regex's > > that should transform my BBCode into correct HTML when rendering.

[PHP] Problem with RegEx for BBCode

2010-11-27 Thread Asmann, Roland
Hi all, I am playing around with PHP and BBCodes and have found some regex's that should transform my BBCode into correct HTML when rendering. However, I have found that if the BBCode is not correct (eg missing closing tag), the regex completely eats my input and my page is empty! The regex I'