shmoyko Posted May 26, 2009 Share Posted May 26, 2009 I have the joy of trying to create a MS Word document in German using PHP. I fistly make an instance of the COM object: $word = new COM("word.application") or die("Unable to instantiate word"); ... ($doc defined here, etc.) Then, I set up "bookmarks": $tempBookmark = $doc->Bookmarks('INTRO'); $tempRange = $tempBookmark->Range; $contentRange->FormattedText = $tempRange; $contentRange->Find->Execute('{Something}', 1, 0, 0, 0, 0, 1, 0, 0, $something, 2); The above is just a sample. The problem is this: I use the mb_convert_encoding function to convert text from UTF-8 to ISO-8859-1. Works fine, except when the text is in a table (within Word). Some German characters are not displayed or they're converted to 'English' equivalents. Any idea why this is happening? Why are tables in Word special? Many thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.