| Vicente Werner 2006-03-01, 7:01 pm |
| On 3/1/06, Marcus Bointon <marcus@synchromedia.co.uk> wrote:
>
> On 1 Mar 2006, at 08:53, Vicente Werner wrote:
>
> I've done some experiments and it does indeed 'just work' - getting
> stuff in and out of the DB is similarly transparent (and yes I am
> using mysql_real_escape_string!). It's safe to have UTF-8 templates,
> though it seems sensible to keep scripts as iso-8859-1 (though it
> also worked as UTF-8, including literal unicode text in strings).
Well it's not that transparent, the only way to guarantee your stuff in an
out the db won't get corrupted is to transcode into entities in an out. My
main concern was the need to have everything utf-8 encoded so my scenario
might be very different than yours. For example dinahosting runs perfectly
in arab, hebrew -translations were made although they're not online yet-.
It seems I 'only' need to pay attention to modifiers and validation
> functions (strlen, trim and friends). It might be a good opportunity
> to make my validation more modular so that when PHP 6 comes along I
> can swap it all out easily.
I made my own validation system, inspired by smaty_validate but with a
different system. It's fully transparent to the programmer .
While I agree that PHP should probably have sorted this one out
> earlier, I have a fairly large codebase and can't afford to switch
> environments now. Plus there's too much other good stuff in PHP ;^)
Yes, but the benefits of PHP for this particular scenario don't weight
against it's lackings.
--
Vicente Werner y Sánchez
|