Changeset 3182
- Timestamp:
- 05/19/2016 07:03:38 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-readme-parser.php
r3181 r3182 65 65 $contents = array_map( array( $this, 'strip_newlines' ), $contents ); 66 66 67 // Strip BOM67 // Strip UTF8 BOM if present 68 68 if ( strpos( $contents[0], "\xEF\xBB\xBF" ) === 0 ) { 69 69 $contents[0] = substr( $contents[0], 3 ); 70 } 71 72 // Convert UTF-16 files 73 if ( strpos( $contents[0], "\xFF\xFE" ) === 0 ) { 74 foreach ( $contents as $i => $line ) { 75 $contents[$i] = mb_convert_encoding( $line, 'UTF-8', 'UTF-16' ); 76 } 70 77 } 71 78
Note: See TracChangeset
for help on using the changeset viewer.