× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, Mar 15, 2017 at 9:28 AM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
On Tue, Mar 14, 2017 at 5:01 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

You gave the example of Notepad++ which already does
this. (Well, it's Windows software, so doesn't directly use CCSID, but
the point is it doesn't need the BOM to detect UTF-8.)


Is that really true?

Yes, it is.

From what I see in the settings, you can configure it to simply default
ANSI to UTF-8 on opening...

I don't see how it could possibly tell the difference; assuming the
document only contains US-ASCII text.

There literally is no difference between ANSI and UTF-8 when the
entire contents are US-ASCII (and that's by design), so you're right
that it "can't tell". But as far as the file on disk is concerned,
that doesn't matter, because the file system used by Windows (or Linux
or Mac) doesn't store encoding metadata (that is, they don't store
anything analogous to CCSID).

So what that setting is for is to tell Notepad++ that when a file is
opened, and its entire contents are in the common ASCII subset, to
operate as though it's UTF-8; the ramification being that *if, during
editing, you add characters outside of the common subset* it will use
UTF-8 encoding when saving the file. (There might be other, more
subtle effects, like perhaps what bytes get copied to the clipboard or
something.)

I don't personally use Notepad++, so I don't know if an ASCII-only
file read in as UTF-8 will necessarily be saved with BOM or not. I
would guess that if it didn't have BOM before, then it won't have BOM
upon saving.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.