User avatar
bensimmo
Posts: 4988
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: How To Get Mousepad To Read Standard Text Files

Wed Mar 11, 2020 5:21 pm

Just opened mousepad (not used the pi for text for a while) to have a look.

Leafpad was nice as it was simple to edit Python3 files quickly and editing the system text files etc (Friendlier for most people than nano).
Simple.

Mousepad is a bit of a 'coding' targeted editor and has options, colours, tabs etc.
More involved than a simple leafpad/notepad program.
No idea why they changed, unless it's for colour coded text and syntaxing.

Looks like mousepad is being fixed on xfce bugzilla, which is its home (if you go through help).

I'm surprised of the change as leafpad worked well for what I thought it was there for.

Back to mousepad, a bit of tweaking and I have colour coded programs, a toolbar once you find it (why this isn't default for 'beginners'), etc.

But we have Thonny for that? (though it heavier and slower for quick edits)
And Geany for everything else? ( a bit over the top for general use ?)

So no idea why it changed and the most useful 'beginner' feature the toolbars is not there by default :|
Last edited by bensimmo on Wed Mar 11, 2020 7:36 pm, edited 1 time in total.

bjtheone
Posts: 956
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: How To Get Mousepad To Read Standard Text Files

Wed Mar 11, 2020 6:05 pm

ganzgustav22 wrote:
Wed Mar 11, 2020 2:50 pm
This thread is a perfect example of what is wrong with open source. It also explains the sad state of "Linux ready for the desktop". I'm still waiting for that to happen. Have been waiting now for 20 years.

Simple things like opening a textfile with the standard text editor doesn't work without jumping through whatever hoops.

And _of course_ the usual arguments. It's Microsofts fault, you're doing it wrong, 50 years ago people used vi and where happy with 7bit ascii, 75 years ago they were happy punching holes in cards, set some environment variable here and there, re-configure your locale settings, use this and that trick and workaround, emacs is better anyways, your textfile is broken, it totally has to be like this because yadda yadda (while all other editors just work ...).

I think we didn't have "it's open source, if you don't like it, why don't you fix it yourself" yet.
Hummm... OP wanted to support a non standard (by English definition of normal) character set. Strangely enough Linux has no issues dealing with it. You do have to tell the computer (oh the horror) which "non-standard" character set you want to use but I don't really think that qualifies as a particularly high bar for entry.

Microsoft has a very long history of "enhancing" standards to promote lockin and fighting tooth and nail again anyone being allowed to read/write their formats.

You either can manage stuff centrally in registries (Windows) or in a layered fashion with a distributed model (Unix/Linux). Having been a sys admin and software tool supplier in both worlds I know which one I find easier to support in a large multi-site, multi-language environment.

The fact that Windows does stuff differently than was standard in the entire rest of the computing world is not Linux's fault. I would gently point out is it a lot easier to bring data generated on a Window's platform to Linux, than the other way around. Unix and Linux is far far more standard compliant than Microsoft.

Strangely enough, like other, I have been Window's free for many years and yet I seem to have a "desktop environment" that I use every day. I have no issues opening text files in a variety of tools, ranging from awk and sed, to perl, to vi, to emacs, to mousepad, to open office. Obviously I am doing something wrong since I have no issues.

User avatar
bensimmo
Posts: 4988
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: How To Get Mousepad To Read Standard Text Files

Wed Mar 11, 2020 7:36 pm

PeterO wrote:
Wed Mar 11, 2020 5:11 pm
My Pi4 with up to date Raspbian has Leafpad not Mousepad installed. Are you sure it has changed ?

PeterO
Yes, installed a new setup yesterday. But wasn't mentioned in the update *edit wrong update link, I can't find the blog post for Sept 2019 OS release ? Probably why few know about it or remember it changing. I could be wrong.... if anyone find it.

User avatar
scruss
Posts: 3500
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: How To Get Mousepad To Read Standard Text Files

Wed Mar 11, 2020 8:58 pm

bjtheone wrote:
Wed Mar 11, 2020 6:05 pm
Hummm... OP wanted to support a non standard (by English definition of normal) character set.
Oddly enough, having just tried mousepad (inorite?) with ISO-8859-1 text, I'm pretty sure that the OP does not want ISO-8859-14 text at all. Just for some inexplicable reason, it's the first character set offered by mousepad when it finds non-Unicode text:
2020-03-11-164642_755x388_scrot.png
mousepad, on encountering a non-UTF-8 file
2020-03-11-164642_755x388_scrot.png (51.37 KiB) Viewed 1126 times
When mousepad saves a file, it retains the encoding, so you have to go through the whole mess of converting it again.
Mousepad also seems to understand CRLF style text with no complaints.

A default of ISO-8859-15 might seem a lot more logical. The list isn't even in asciibetical order.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

klricks
Posts: 7293
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How To Get Mousepad To Read Standard Text Files

Wed Mar 11, 2020 9:53 pm

bensimmo wrote:
Wed Mar 11, 2020 7:36 pm
PeterO wrote:
Wed Mar 11, 2020 5:11 pm
My Pi4 with up to date Raspbian has Leafpad not Mousepad installed. Are you sure it has changed ?

PeterO
Yes, installed a new setup yesterday. But wasn't mentioned in the update *edit wrong update link, I can't find the blog post for Sept 2019 OS release ? Probably why few know about it or remember it changing. I could be wrong.... if anyone find it.
It is mentioned in the release notes:

2019-09-26:
* Mousepad used as simple text editor instead of leafpad
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
Paeryn
Posts: 3086
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: How To Get Mousepad To Read Standard Text Files

Wed Mar 11, 2020 11:30 pm

scruss wrote:
Wed Mar 11, 2020 8:58 pm
A default of ISO-8859-15 might seem a lot more logical. The list isn't even in asciibetical order.
The list is in an order, they first are grouped e.g. West European then East European etc. and in each group they are alphabetical by name e.g. West European contains Celtic, 2x Greek, Nordic, South European and 4x Western in that order.

That explains why Celtic is first, there is no way for the program to tell which is the most likely wanted so unless the locale specifies a specific charset to use and that charset translates the file to valid UTF-8 the best thing for the program to do is to ask the user.

Looking at the source code it will check the locale, it asks glib to convert the buffer to UTF-8 and glib tries the locale. If the locale doesn't supply a charset it will look for a few environment variables to give a charset but if the locale says UTF-8 those variables won't be checked so they can't be used to override the locale.
She who travels light — forgot something.
Please note that my name doesn't start with the @ character so can people please stop writing it as if it does!

User avatar
scruss
Posts: 3500
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 3:26 am

If that's an order, it's a very tenuous one. It starts with Celtic, skips over a whole bunch of Europe to Greek, from there goes Nordic and then back down to Turkey. It then visits an old DOS code page before hitting the obsoletish 8859-1 (use 8859-15, it has €)
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

User avatar
bensimmo
Posts: 4988
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 7:29 am

klricks wrote:
Wed Mar 11, 2020 9:53 pm
bensimmo wrote:
Wed Mar 11, 2020 7:36 pm
PeterO wrote:
Wed Mar 11, 2020 5:11 pm
My Pi4 with up to date Raspbian has Leafpad not Mousepad installed. Are you sure it has changed ?

PeterO
Yes, installed a new setup yesterday. But wasn't mentioned in the update *edit wrong update link, I can't find the blog post for Sept 2019 OS release ? Probably why few know about it or remember it changing. I could be wrong.... if anyone find it.
It is mentioned in the release notes:

2019-09-26:
* Mousepad used as simple text editor instead of leafpad
Well yes, it was mentioned before in the thread. But there is usually a blog post for OS releases with changes, it may seem a minor change but when instructions use leafpad or 'sudo leafpad' to edit files, something they did to replace nano for desktop users* and then others followed for Jams, Club instructions etc, things stop working.. Probably why I remember it being installed at some places. I didn't think about it then.
It would also be nice to see why they changed from something working perfectly well.
Maybe an alias could be used so leafpad launched mousepad?

As a note, these programs are often tested and chosen with good consideration and debate to see which is best for education. It will not have been changed in a whim, but for good usability educational reasons.



Edit to add
*
Attachments
Screenshot_20200312_073236_com.android.chrome.jpg
Screenshot_20200312_073236_com.android.chrome.jpg (192.72 KiB) Viewed 1034 times

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 8:02 am

These arbitrary changes seem to be due to GUI design dogma :roll:
I guess leafpad has a button in a non-approved position or something !
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27433
Joined: Sat Jul 30, 2011 7:41 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 9:48 am

Just a quick note to say that Mousepad is not XFCE specific, so doesn't add to the library burden. Both Leafpad and MousePad are GTK applications, so run fine on our desktop (LXDE) or XFCE which are both GTK based desktops.

We moved to Mousepad for some obscure reason, but there definitely was a reason, possibly to make it consistent for the x86 Desktop, but the guys who knows for sure is not in the office.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 10:00 am

jamesh wrote:
Thu Mar 12, 2020 9:48 am
, but there definitely was a reason, possibly to make it consistent for the x86 Desktop,
Seems "arse about face" considering it's made work for people who now need to update tutorials etc.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27433
Joined: Sat Jul 30, 2011 7:41 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 10:23 am

PeterO wrote:
Thu Mar 12, 2020 10:00 am
jamesh wrote:
Thu Mar 12, 2020 9:48 am
, but there definitely was a reason, possibly to make it consistent for the x86 Desktop,
Seems "arse about face" considering it's made work for people who now need to update tutorials etc.
PeterO
It's referred to as Text Editor in the menus to I'm going to update to the docs to use that since it's app independent.

edit: PR here, was only a small change. https://github.com/raspberrypi/documentation/pull/1431
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 10:29 am

jamesh wrote:
Thu Mar 12, 2020 10:23 am
PeterO wrote:
Thu Mar 12, 2020 10:00 am
jamesh wrote:
Thu Mar 12, 2020 9:48 am
, but there definitely was a reason, possibly to make it consistent for the x86 Desktop,
Seems "arse about face" considering it's made work for people who now need to update tutorials etc.
PeterO
It's referred to as Text Editor in the menus to I'm going to update to the docs to use that since it's app independent.
But that won't work where people have got "type this command" in step by step tutorials.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Heater
Posts: 16846
Joined: Tue Jul 17, 2012 3:02 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 10:34 am

I guess it could have been worse. Whoever changed in on a whim could have been an emacs fanatic. :)
Memory in C++ is a leaky abstraction .

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27433
Joined: Sat Jul 30, 2011 7:41 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 10:45 am

ganzgustav22 wrote:
Wed Mar 11, 2020 2:50 pm
This thread is a perfect example of what is wrong with open source. It also explains the sad state of "Linux ready for the desktop". I'm still waiting for that to happen. Have been waiting now for 20 years.

Simple things like opening a textfile with the standard text editor doesn't work without jumping through whatever hoops.

And _of course_ the usual arguments. It's Microsofts fault, you're doing it wrong, 50 years ago people used vi and where happy with 7bit ascii, 75 years ago they were happy punching holes in cards, set some environment variable here and there, re-configure your locale settings, use this and that trick and workaround, emacs is better anyways, your textfile is broken, it totally has to be like this because yadda yadda (while all other editors just work ...).

I think we didn't have "it's open source, if you don't like it, why don't you fix it yourself" yet.
Please don't do this. This thread has nothing to do with open source, and you have used it as an excuse for a completely unnecessary and incorrect rant.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

pica200
Posts: 219
Joined: Tue Aug 06, 2019 10:27 am

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 10:54 am

I don't see the problem to be honest. It's just as easy to use as leafpad and even got basic features like syntax highlighting without overwhelming the useru. The encoding dialog is annoying, yes but it almost exclusively happens for stuff written in Notepad (which supports UTF-8 since many years but it's not the default on older Windows).

And yeah, this has nothing to do with open source. The open source world made a good choice going with UTF-8 in my opinion.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27433
Joined: Sat Jul 30, 2011 7:41 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 11:10 am

PeterO wrote:
Thu Mar 12, 2020 10:29 am
jamesh wrote:
Thu Mar 12, 2020 10:23 am
PeterO wrote:
Thu Mar 12, 2020 10:00 am

Seems "arse about face" considering it's made work for people who now need to update tutorials etc.
PeterO
It's referred to as Text Editor in the menus to I'm going to update to the docs to use that since it's app independent.
But that won't work where people have got "type this command" in step by step tutorials.

PeterO
In the documentation area, , which is the bit I am in control of, there are no longer any references to LeadPad at all.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 11:44 am

jamesh wrote:
Thu Mar 12, 2020 11:10 am
In the documentation area, , which is the bit I am in control of, there are no longer any references to LeadPad at all.
That's nice for you :roll:
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27433
Joined: Sat Jul 30, 2011 7:41 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 11:58 am

PeterO wrote:
Thu Mar 12, 2020 11:44 am
jamesh wrote:
Thu Mar 12, 2020 11:10 am
In the documentation area, , which is the bit I am in control of, there are no longer any references to LeadPad at all.
That's nice for you :roll:
PeterO
And your point being? Or just being rude?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Heater
Posts: 16846
Joined: Tue Jul 17, 2012 3:02 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 5:03 pm

I think PeterO's point is that any change in the out of the box experience of installing and using Raspbian, no matter how teeny-weeny, causes a whole pile of existing information in blogs, tutorials, educational materials etc all over the net to no longer work anymore if followed to the letter.

I have no idea how much this change in editor invalidates everything out there. Other classic cases have been the change of address of GPIO pin registers, and the weird goings on with network configuration.

Of course many of us are old and ugly enough to know how this goes, everything changes all the time for whatever reasons and whatever you read on the net should therefore be taken as a hint rather than absolute truth as to how to proceed.

I can understand the frustration of a beginner reading "Do this, do that, do the other". When "Do this" looks completely different and does not do what they have read.
Memory in C++ is a leaky abstraction .

User avatar
PeterO
Posts: 5972
Joined: Sun Jul 22, 2012 4:14 pm

Re: How To Get Mousepad To Read Standard Text Files

Thu Mar 12, 2020 5:55 pm

jamesh wrote:
Thu Mar 12, 2020 11:58 am
PeterO wrote:
Thu Mar 12, 2020 11:44 am
jamesh wrote:
Thu Mar 12, 2020 11:10 am
In the documentation area, , which is the bit I am in control of, there are no longer any references to LeadPad at all.
That's nice for you :roll:
PeterO
And your point being? Or just being rude?
Heater has summarised it well. RPT/RPF seem oblivious to the potential impacts for others when they make changes to an otherwise stable system, especially when they don't justify the changes and hide the fact in change log. If there really was any benefit to the change I would expect them to want to advertise it not to hide it.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

emma1997
Posts: 1088
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: How To Get Mousepad To Read Standard Text Files

Sat Mar 14, 2020 12:08 am

bjtheone wrote:
Wed Mar 11, 2020 6:05 pm
Hummm... OP wanted to support a non standard (by English definition of normal) character set.
scruss wrote:
Wed Mar 11, 2020 8:58 pm
I'm pretty sure that the OP does not want ISO-8859-14 text at all.
OP does not want ANY particular protocol or character set. Just an editor that recognizes without complaint ASCII created at the dawn of printing machines and used by 99% of all desktop computers to this very day.

As I hinted above it is not really so much the creation of all these genius extensions and protocols. They do have valid applications. It's forcing them down everybody else's throat that have no need that's making life difficult.


buja wrote:
Wed Mar 11, 2020 5:01 pm
Not relevant for this topic, but this raises the question why Mousepad replaced Leafpad in Raspbian,
bensimmo wrote:
Wed Mar 11, 2020 5:21 pm
No idea why they changed, unless it's for colour coded text and syntaxing.
...
So no idea why it changed and the most useful 'beginner' feature the toolbars is not there by default :|
It seems somewhat obvious who has actual experience with these and who has not. They are not at all similar in size, ergonomics, features, etc. Mousepad is much closer to Notepad/Wordpad in every respect. So maybe there is a trend toward better software buried deep inside the Linux world after all.

Too bad they spoil it with pointless features like this startup check.

I just wish the old anti-MS element inside development teams did not so often succeed insinuating their own particular 'No Pain No Gain' philosophy.


bjtheone wrote:
Wed Mar 11, 2020 6:05 pm
Strangely enough Linux has no issues dealing with it.
Actually this thread is just one example of Linux having exactly that.

On the other hand take Wordpad. It handles both nixie and wintel line endings transparently and smartly with no protocol hiccups. With about 1/10th the resources too.


bjtheone wrote:
Wed Mar 11, 2020 6:05 pm
The fact that Windows does stuff differently than was standard in the entire rest of the computing world is not Linux's fault.
From what I can tell Windows IS the rest of the computing world. It's not surprising to see another example of the 1% insisting they are the 99%. I'm sure it's a tendency of all human's, including myself, but a little fact checking (with eyes open) often reveals the truth.

Although it might not seem like it I'm not a fan of Windows myself. It would not be in my top 3 favorite OS. Lately I've been splitting about half my time with Linux and have a definite opinion on which is easy/productive/universal and which is flexible/powerful/low-cost.

PS If only we could lock these two up in a closet and a perfect baby OS emerges 9 months later. lol

Heater
Posts: 16846
Joined: Tue Jul 17, 2012 3:02 pm

Re: How To Get Mousepad To Read Standard Text Files

Sat Mar 14, 2020 1:44 am

emma1997 wrote:
Sat Mar 14, 2020 12:08 am
If only we could lock these two up in a closet and a perfect baby OS emerges 9 months later. lol
Well... It took a lot longer than 9 months and I don't know if one would call it a "perfect baby" or something of a Frankenstein monster but a few years ago Microsoft introduced the Windows Subsystem for Linux (LSW) on Windows 10. The result being that after ignoring Windows since 1998 I have been using Win 10 and the LSW happily for two or three years. Finally MS made an OS baby that I could actually get work done with.

emma1997 wrote:
Sat Mar 14, 2020 12:08 am
OP does not want ANY particular protocol or character set. Just an editor that recognizes without complaint ASCII created at the dawn of printing machines and used by 99% of all desktop computers to this very day.
That is not the case though is it. You do not want to open an ASCII file. You want to open a text file encoded as iso-8859-14 other wise known as latin-8. A standard introduced in 1998.
emma1997 wrote:
Sat Mar 14, 2020 12:08 am
As I hinted above it is not really so much the creation of all these genius extensions and protocols. They do have valid applications. It's forcing them down everybody else's throat that have no need that's making life difficult.
iso-8859-14 is one of the many "genius extensions" devised to make ASCII usable around the world. A perfectly valid idea. Only it turns out that causes chaos and confusion, as your problem demonstrates, and so Unicode was invented.

I was thinking, could you possibly, may be, zip up one of the text files that is causing your problems and post it here? I'm curious to know what all the editors I have here do with it out of the box.
Memory in C++ is a leaky abstraction .

User avatar
jahboater
Posts: 6290
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: How To Get Mousepad To Read Standard Text Files

Sat Mar 14, 2020 1:57 am

emma1997 wrote:
Sat Mar 14, 2020 12:08 am
From what I can tell Windows IS the rest of the computing world. It's not surprising to see another example of the 1% insisting they are the 99%. I'm sure it's a tendency of all human's, including myself, but a little fact checking (with eyes open) often reveals the truth.
That's interesting. I had thought that Windows was only popular on the desktop, and that's shared with MAC's.
Embedded and servers are dominated by Linux and how many Windows based mobile phones do you see?
(Android is Linux and Apple OS's are based on BSD UNIX). Chrome is Linux.
As a percentage of the "computing world", Windows must be quite small now.
Pi4 8GB running PIOS64 Lite

User avatar
scruss
Posts: 3500
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: How To Get Mousepad To Read Standard Text Files

Sat Mar 14, 2020 2:09 am

emma1997 wrote:
Sat Mar 14, 2020 12:08 am
OP does not want ANY particular protocol or character set. Just an editor that recognizes 7 bit ASCII created at the dawn of printing machines and used by 99% of all desktop computers to this very day.
Good to know. Mousepad, Leafpad and any other Linux editor you could name already do that. The fact that you were getting the character set warning is because you didn't have 7-bit clean ASCII in your files.

UTF-8 is 100% 7-bit ASCII compatible; that was the whole point of it. Ken Thompson and Rob Pike did a good job of designing it back in 1992. I'll bet your files have "smart quotes" in them: 0x93 and 0x94 bytes for quotation marks. Windows WordPad was particularly rancid for putting them in without permission. Maybe run one of these text files through xxd to hexdump the character codes: you might be surprised. Yes, I know you didn't type them if they're there.

If your files have got polluted with CP-1252 characters, there's not much you can do to get it to display on a Raspberry Pi. I don't know of any locales that use 1252. You're going to have to make friends with the iconv command to convert everything to UTF-8. Thankfully Windows knows about it these days and should display it cleanly.

(Back in the late 90s I ran the computational division of a dictionary company. Windows character weirdnesses bit us all the time. It's been a while since I've seen this problem in the wild.)
On the other hand take Windows Wordpad. It handles both nixie and wintel line endings transparently and smartly with no protocol hiccups. With about 1/10th the resources too.
Then again, WordPad is 100% Windows system libraries. All that Rich Text and GUI handling is part of Windows, so of course it doesn't appear bloated.
Actually Windows IS the rest of the computing world.
I dunno; I see an awful lot of Macbooks out there. And Microsoft is getting with the programme too with WSL. We'll eventually see the back of that extra EOL character that mechanical teletypes needed to read and discard while the print head flew back. But maybe not quite in my lifetime.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Return to “General discussion”