Force to UTF-8 option problem
-
I use Ultimate Member most recent alone (without any add-ons)
I encountered the following problem:if user fills the Registration form in UTF-8 with non-English characters (e.g. Cyrillic) then the user’s display name (in profile) is garbage (????? ?????). This is because user_meta[‘first_name’\ and user_meta[‘last_name’} are garbage, and user meta is garbage because:
function um_force_utf8_string( $value )invokes$utf8_decoded_value = utf8_decode( $value );which does not (see PHP documentation) convert any UTF-8 character properly. Thus, if “Force Strings to UTF-8 Encoding” option is “On”, and the$valueis in UTF-8 already (e.g. it contains value of the ‘first_name’ field of the registration form) thenutf8_decodemay return garbage, andum_force_utf8_stringwill return the garbage too.Regards,
Michael.
The topic ‘Force to UTF-8 option problem’ is closed to new replies.