php - Character encoding issue when importing into WordPress -
i've created routine migrate content drupal wordpress. i'm querying drupal database within php script, using wp_insert_post()
add together info wordpress database.
i'm having issue character encoding, after i've inserted drupal content wordpress characters cause remainder of string stripped.
take example:
<strong>the next text stop @ tick’, text stripped out</strong><br />
when importing this, after tick remove, such:
<strong>the next text stop @ tick
to seek remedy issue i've attempted alter character encoding, strips out tick, funky space-like character, characters pound £
symbol.
$html = iconv('utf-8', 'us-ascii', $html);
i've tried //translit
, //ignore
function, still either removes these characters or stops @ first problem.
can advise on way content format of accepted wordpress, without removing these characters, convert them alternative.
edit
i've tried passing string through htmlentities()
, returns empty string.
additionally i've attempted determine encoding of string using mb_detect_encoding()
, returns false, meaning cannot observe encoding.
edit 2
when view drupal database record in hex mode tick returns ’
.
php wordpress drupal character-encoding
No comments:
Post a Comment