Question:
Notepad save problem?
knight
2010-07-01 08:57:12 UTC
I visited to ebay and copied some links and item names to Notepad. When i tried to save that it displayed the following message.

c:\documents and settings\user\items.txt

this file contains charcter in unicode format which will be lost if you save this file as an ANSI encoded text file. To keep unicode information, click cancel below and then select one of the unicode options from the Encoding drop down list. Continue?



this is the first time which I experienced this. I saved some other notepad files with some other links and they didn't display this matter. wHY This occured?


Anyway I browsed the web using "SAFE RUN" mode in Kaspersky antivirus 2011.
Three answers:
Jallan
2010-07-01 10:17:33 UTC
Notepad normally saves in what Microsoft call “ANSI” format, which means that the file saved only has characters that occur in your 256-character, old style character set. If your computer is set up for English, this would be code page 1252. See http://en.wikipedia.org/wiki/Windows-1252 .



Presumably, whatever you copied from ebay contains at least one character that is not in Code Page 1252, and therefore you must either do what the message says and save the file in a Unicode format or have any character or characters not in Code Page 1252 be transformed into “?”.



Ignore the other answer which hopelessly confuses ASCII and what Microsoft calls “ANSI”. The ASCII character set contains only 128 characters and the curly apostrophes are part of Code Page 1252, so would not be the problem. Code page 1252 contains both curly apostrophes and a number of accented letters.



Microsoft’s terminology is confusing. In Notepad, you can chose the file encoding by selecting one of four types from the “Encoding box”.



The first type is “ANSI”, by which Windows means whatever old-style, pre-Unicode character set is being used as your standard character set. Actually, none of the Windows character sets were an ANSI standard. See http://en.wikipedia.org/wiki/American_National_Standards_Institute .



The second type is “Unicode”, by which Windows means “UTF-16 small endian” which is the form of Unicode normal for Windows.



The third type is “Unicode big endian”, by which Windows means “UTF-16 big endian” which is the form of Unicode used by default on some other operating systems.



The fourth type is “UTF-8”, which is the form of Unicode used on the web and on some other operating systems, notably in Linux and in Apple Macintosh.



Normally, for files to be used in Windows, there is no reason to save in these last two encodings.
zitima
2010-07-01 10:05:25 UTC
Hi!



This is most likely because you copied an item description which didn't have 'standard' ASCII characters (256 total). These are basically 0-9, a-z, A-Z, and basic punctuation. If the item names had anything different, including something such as smart quotes (the quotes and apostrophes ' which tilt to either side, like “test” instead of "test"), or Greek characters, or characters with accents (á, or café), then you're using Unicode.



This is normal. You can just save the file as ANSI, and the characters will get converted to their nearest ASCII equivalent (á=a), or just select Unicode from the save as list and it will save the special characters.



Hope this helps.
Nicholas
2017-02-20 02:01:28 UTC
1


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...