- Timestamp:
- May 19, 2017 2:49:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r601 r605 135 135 return $output; 136 136 } 137 138 /** 139 * @param string|mixed $value A string to UTF8-encode. 140 * 141 * @returns string|mixed The UTF8-encoded string, or the object passed in if 142 * it wasn't a string. 143 */ 144 function conditionalUTF8Encode($value) 145 { 146 if (is_string($value) && mb_detect_encoding($value, 'UTF-8', true) != 'UTF-8') { 147 return utf8_encode($value); 148 } else { 149 return $value; 150 } 151 } 152 137 153 138 154 /**
Note: See TracChangeset
for help on using the changeset viewer.