[Typo3-dev] character conversion JS -> PHP and class.t3lib_cs.php
Rainer (Rene) Suthoelder
t3 at boswel-remove-me.de
Wed May 11 17:22:16 CEST 2005
hi!
perhaps someone can point me to the right direction:
i run across the problem of converting/manipulating strings from BE form
fields.
the problem:
i want to import FE users from file, which is already running fine.
as a last step, i wanted to mimik the field eval functions: to get compliant
usernames, they have to be all lowercase. not a big problem, i thought, but
then i learned that this conversion is done on the client side using
javascript (jsfunc.evalfield.js, toLowerCase()) which takes into account the
remote's machine locale.
since i do my char conversion on the server side, problems occur with
character sets: the file gets uploaded from whereever in whatever language
and on the server we have the server's locale and that might differ from the
browser's locale.
as a user you would expect (once told so) that you simply have to type in
the password all lowercase. a german user would type in ö (ö) instead
of Ö (Ö). this only works if you have identical locales defined on both
sides, otherwise you might get unpredicted strings.
so, what to do? should i simply use mb_strtolower() while converting? or how
could class.t3lib_cs.php help me in that respect?
any help highly appreciated.
rainer
More information about the TYPO3-dev
mailing list