Quote:
Originally Posted by macropod
Your text file contains just two characters: > and <. If you want us to see what's in a document, please attach the document to a post.
|
Okay, here it is, attached. I thought a text file would be simpler.
If you can see only two characters, then it mean that either (a) you opened it in a text editor that doesn't support unsupported characters or (b) you opened it in MS Word but did not switch on the view of non-printing characters.
Quote:
I don't understand why you'd attach a zipped 8 byte file that's actually 130 bytes larger than the file being zipped...
|
Because a zip file is a binary file, and my question related to a character that is not in the "usual" position in the character encoding grids, so uploading as plain text carries a risk that your web site's upload function might break the file when reading and writing it.
Anyway, I have since found two methods of getting the character's appropriate code in MS Word.
Method 1 (if you want to be able to type the character):
First find out the character's UTF8 hex code (e.g. save it as plain text and view it in a hex editor), then search for it in the fileformat.info site, e.g. to search for EFBBBF (notice I made a mistake in the thread title... it's not EFBBEF) you'd visit
this link.
- To type this character in MS Word, you need the "HTML entity hex" code (minus the initial X). In the case of EFBBBF, the HTML entity hex code is FEFF. To type this character in MS Word, type FEFF and press Alt+X.
- To find/replace this character, you need the "HTML entity decimal" code, which in the case of EFBBBF is 65279. To find this character, in the Find dialog type ^u65279.
Method 2 (simpler, but then you can't type the character directly):
Start recording a macro, select the character, and press Ctrl+H to open a find/replace dialog (the "find" field will appear empty). Then do a quick dummy find/replace, and then stop recording the macro. The code to use in MS Word will then be visible in the macro -- in the case of my character, it's ChrW(65279). To find this character, in the Find dialog type ^u65279.
If you know of simpler ways of (a) finding out what character it is and (b) typing it directly without consulting a web site, I'll be happy to hear it.
Thanks
Samuel