26 февраля 2008 г. 15:58Importing a text file with an htm or php extension results in stripping apostrophes from text section (and ellipses ...). Doing so with a .txt extension keeps all characters, but I can't get the txt file to become a web page - code only view even if change extension. (The stripped .htm or .php work fine.)
Still experimenting, but I must be missing something.
The same file(s) import into Frontpage without stripping.
No difference whether I drag and drop or use File -> Import.
Any ideas how to avoid this? Is this a "by design" feature?
My workaround will be to use & codes, but that's going to require a bit of work on the vba code I'm using to create the pages (from previous pages).
Edit: It appears the characters being stripped are nonstandard: chr 145 and 146; chr 39 comes through okay. Quote marks of various types seem okay.
- Изменено StanVideo 26 февраля 2008 г. 17:55 Addition
27 февраля 2008 г. 9:25This seems to be a character encoding problem. You might lose non-ASCII characters when you open a page that does not have an explicit "meta" encoding declaration and uses an encoding such as Windows-1252. xWeb defaults to UTF-8.
Open the page, then go to "File > Properties... > Language" and select "US/Western European (Windows)" from the "Reload the current document as" combobox. The non-ASCII characters such as ‘ or ’ such as should then appear properly. Open that dialog again and choose an encoding (for .php files, you should probably choose "US/Western European (Windows)" again) from the "Save the document as" combobox and click OK. This will create a "meta" declaration which xWeb will use the next time you open the page.
- Помечено в качестве ответа Corrie WilesMicrosoft Employee, Moderator 30 июля 2008 г. 20:51
28 февраля 2008 г. 2:27Excellent. I had discovered that this was a character encoding issue, but did not know how to set xWeb. My documents is this site are set to utf8 (therefore unicode, right?). And xWeb was stripping anything non-unicode. All is fine as long as I convert to unicode before import.
The setting you describe was set to automatic, and I won't experiment tonight by changing the settings - time to get this project finished! I assume that I will get the most accurate pass through of my original by using the setting you recommend.
I need to read up on the 3 settings on that page (mark current document as; save document as; and reload as).