[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] Copying text (curly quotes) from Word into an XML document (UTF-8): what happens?
- From: "Len Bullard" <cbullard@hiwaay.net>
- To: "'Costello, Roger L.'" <costello@mitre.org>, <xml-dev@lists.xml.org>
- Date: Sun, 2 Sep 2007 15:34:36 -0500
Word opens a dialog asking for the encoding you prefer. Select UTF-8. Go
back to Notepad and you may see an odd character right before the XML
declaration as well. Word cares about the encoding and it will stuff odd
characters in. It is not exclusively a problem with curly quotes.
I use PFE for hand editing XML. The encoding issues don't occur there.
Don't use Word to edit XML. That is probably good advice for most of the
early WYSIWYG editors.
len
From: Costello, Roger L. [mailto:costello@mitre.org]
Hi Folks,
Suppose I use Notepad to compose an XML document. I indicate in the XML
declaration an encoding of UTF-8.
Suppose I copy text from Word into the XML document. Suppose the text
is: "Hello World", except suppose the quotes are curly quotes rather
than straight quotes as shown.
The text appears fine in Notepad. That is, the curly quotes look fine.
I save the Notepad file, and then drag and drop the file into Internet
Explorer, which gives an error:
An invalid character was found in text content.
QUESTIONS
1. Is the curly quote a valid UTF-8 character?
2. Word uses Windows-1252 encoding, correct?
3. The curly quote in Windows-1252 has a specific binary sequence,
correct?
4. When I copy the curly quote from Word into Notepad, the operating
system does a straight 1-1 copy of the binary sequence, correct?
5. When I copy the curly quote from Word into Notepad, there is no
conversion or translation of the binary sequence by the operating
system, correct?
6. Assuming the curly quote is a valid UTF-8 character, is the
Windows-1252 curly quote binary sequence the same as the UTF-8 curly
quote binary sequence?
7. Is the Windows-1252 curly quote binary sequence illegal in UTF-8,
i.e. the Windows-1252 curly quote binary sequence doesn't correspond to
any UTF-8 character?
8. Suppose I save the Word document as XML, and then I open the XML
using Notepad. The curly quotes no longer appear as curly quotes;
instead they appear as a bizarre character. Why does the curly quote
now look like a bizarre character in Notepad, whereas when I copied the
curly quote from Word to Notepad it looked fine in Notepad?
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]