Default 'external' text editor?

I have a resource that is a text file in my project.
When I double click on it (in windows) it opens up notepad.
I’m afraid of notepad and it’s implementation of what text file is…
These days my text seems to be being converted to something other than ascii, like UTF-8 or Unicode… and messes with me.

Is there a way to say i want to use NotePad++ as my ‘external’ text editor?

If you’re looking to do it permanently for all text files, you can change the default from the File Explorer.

1 Like

ASCII is a subset of UTF-8. And Unicode is not an encoding. It’s just a list of all characters starting with the ASCII null.

Have a look at:

You will see that the first 128 code points are the ASCII table.

So if your “text file” is ASCII, then to say it’s converted into UTF-8 is meaningless. It already is UTF-8.

The usual complaint is that notepad screwed up the UTF-8 and spit out pure ASCII. What changes are you seeing?

It seems to be just that, it was ascii and somehow it no longer is. The content is there but the formatting is wrong as an ascii text file with incorrect line feeds and What looked like letter and figure shift characters to ‘implement’ camel case.
NotePad++ seems a little more sane in it’s selection.

Can you post an image?

This worked… but was it only for ‘that’ one file or for all text files now?

It’s just a 7 bit ascii file, with linefeeds.
but Notepad decided otherwise and now Notepad++ says it’s UTF-8 and has Carriage Return and line feeds… And somehow _ gets translated… shazbats.

And that text page will be copied into your application (when generated)… as is whatever element you drop into the navigation pane.

So, be careful.

It’s not a pure ASCII file.
That ZWSP stuff is a specific Unicode character, used to hint where a line break can occur if needed, but without displaying a hyphen or similar. (Zero Width Space)
It has a double byte unicode value of U+200B

7 bit ascii file, with linefeeds…now Notepad++ says it’s UTF-8 and has Carriage Return and line feeds

if you allow an external editor to amend your text, you can’t always force it to work the way you want it to, and on some machines, it won’t be Notepad OR Notepad++
Notepad++ spots that you are using linefeed only, and leaves it alone
Notepad unapologetically uses Windows end-of-lines -Carriage return + Linefeed

If you read the file back in, from a Windows machine, and it could include Windows endoflines where you really want just linefeed, use


and if that ZWSP is intentional, it is a UTF8 file.

This is perhaps slightly midleading. It has a unicode value U+200B, which, when encoded in UTF-8, takes actually three bytes, thus (from the URL I posted before):

Code Point   UTF-8        Character Name
----------   -----        --------------
U+200B       e2 80 8b     ZERO WIDTH SPACE

Amazing how a simple thing like a text file can have become so complicated.
Maybe it’s time to retire file extensions on windows.
.txt isn’t ‘sufficient’. I can’t even begin to vent about small differences like carriage return line feed vs carriage return or just line feed Three ways to do something that no longer has any bearing to a typewriter.

Notepad++ is free and will not mess with the data. Much better than Microsoft notepad.


1 Like

Windows, Mac…
The OK and cancel buttons are reversed
The window menubar icons are on opposite sides. You’ld imagine that was because they just ‘wanted to be different’
But in many ways they copy each other - Macs dropped reliance on resource forks and moved to file extensions, mimicking Windows. Windows hid file extensions, mimicking Macs…

no longer has any bearing to a typewriter.

Used to be relevant to VT terminals too, if I recall.

But back on topic, at least Xojo’s ability to replace line endings means you can take a text file and read it, and turn it into the form you like, with a line of code.

1 Like

Apple has only partially moved to file extensions, far as I can see. And to teh extent that they did was just market pressure. Shame they gave in to that, though - putting metadata about the file in as part of the filename was always a bad idea. Such metadata belongs in the file system’s directory entry for the file.

1 Like