🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #264886

Re: Dialog signature delimiter

#264886
From: bill
Date: Thu, 22 Apr 2021 19:13
123 lines
6500 bytes
On Thu, 22 Apr 2021 20:50:23 +0200, Bernd Rose wrote:

> At the time when OnBeforeSending fires up, the text will be encoded in about
> any imaginable charset, but /not/ in 16-bit Unicode. 

Oh my. OK. That's my fault for not understanding that key complication!
I apologize that this is all very confusing to me.
It just goes to prove I'm way out of my league and I need to let it rest.

> As you type (or Copy&Paste), 40tude Dialog continuously analyzes the text
> buffer. It checks, which characters are contained in the text buffer and
> compares them against the list of permitted charsets:
> Settings -> General_Settings -> Charsets -> Use_best_matching_charset_out_of

Oh. I see. I think. OK. That's why it's complicated I guess. 

The character set in Dialog's editor can keep changing as I paste from
various web sites (depending on what's used by those various web sites).

> It internally reduces the list of charsets to those, that have the /least/
> number of (different) characters contained in the text buffer, which can not
> be encoded. As long, as you leave Unicode-encoding charsets like UTF-7 and
> UTF-8 in this list, the number of un-encodable characters should be zero. 
> From the remaining list of charsets, it picks the first.

Interesting that it picks the first out of the remainders.
Nice to know. 

> When you watch the "Status" field in the upper area of the Compose Editor
> window, you see the charset adjusting to the text you type. Until now, 
> my current message shows "us-ascii", because it contains no special chars,
> at all. 

I had not even noticed that "Status" field just below the Subject,
Newsgroup, and Email to headers! Thanks for pointing that out.

Mine says "Not yet sent (Charset utf-8)" at this very instant.

> In your case, a different charset might have been selected.

Thanks for explaining that it depends on what is in my list.
And in what order.

I just removed all your curly quotes and the Status changed instantly to
"Not yet sent (Charset iso8859-1)" as you implied it would.

I removed just now the German characters you typed and the Status field
instantly changed to "Not yet sent (Charset us-ascii)" (as you said it
would).

> To avoid creating garbage by the replacements, OnBeforeSending would need
> to detect the current charset /and/ have replacement rules for every charset
> not explicitly disabled. 

Yikes. I get it now. 

I had not realized the Dialog editor character set kept changing depending
on the characters that were in the actual message (and further depending on
what was available in the encoding list and even further what order that
list was in).

You're right. It's way out of my league for sure!

> Moreover, the script code would need to detect and 
> spare all header lines and any encoded attachment of the message.

Aurgh. Even worse. I see. It gets more complex by the minute. :-0

> One solution for the charset detection problem would be, to disable all
> but one charset (from the list of permitted charsets). If you ensure, that
> you always type plain characters from the range of the lower 7-bit ASCII
> characters, this would be fine. But extremely unlikely. 

Hmmmmmmm... I do NOT need fancy characters. 
I only need what I can type on a standard keyboard.
I wonder if that might work for me?

> Therefore, the
> fixed charset would need to be ready for virtually any character. This
> just leaves UTF-7 and UTF-8. (Both have their own problems when used in
> 40tude Dialog with very high Unicode character planes. But that's a 
> different story and solvable with a set of specific scripts.)

I don't know what a "character plane" is but I could get away with just the
English alphabet plus basic punctuation.

> But if you set UTF-7 or UTF-8 as your only permitted charset, you post
> most of your messages with unnecessary overhead. This is - historically -
> massively frowned upon and will get you loads of "friendly suggestions"
> to configure your Newsreader in a more appropriate way.

Oops. Oh well. There goes that idea. ;-/

> Apart from such hints, you'd still need to set up all those replacement
> rules. To make things worse, both UTF-7 and UTF-8 are variable wide
> character encoding schemes. Your replacement rules would not only need
> to replace sometimes one, sometimes more bytes for a single character.
> The replacement function would need to evaluate the whole text stream
> to not mix up multi-byte position start points.

Ayayyai. I see. It's too complex for me.
Way too complex for me.

There's no way it would be worth the effort.
Even if I knew how to program.

> I strongly suggest to leave this idea be...

Wow. Thank you for that detailed explanation.
I strongly agree with you.

I learned a lot about how Dialog works (didn't even know about that Status)
where it's sending this (so far) as "Not yet sent (Charset us-ascii)" and
I'll leave it at that.

Let's drop this train of thought. 
Thanks for all your patient advice (I accept everything you said!)

Regards,
bill
-- 
There were too many pencils that they made a whole state.
It was named Pencilvania.
Technical Details
Message-ID: <s5shs8$1c2t$1@gioia.aioe.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <s5ilpb$kd9$1@gioia.aioe.org> <s5ir5o$7qt$1@tncsrv09.home.tnetconsulting.net> <s5irtv$ene$1@gioia.aioe.org> <s5iu6t$84h$1@tncsrv09.home.tnetconsulting.net> <w1ab8v93kvce$.dlg@b.rose.tmpbox.news.arcor.de> <s5jvec$5s7$1@gioia.aioe.org> <17rf3wjx02quj$.dlg@b.rose.tmpbox.news.arcor.de> <s5klfl$1ue5$1@gioia.aioe.org> <gr2vcjkxmucj.dlg@b.rose.tmpbox.news.arcor.de> <s5nsda$1lat$1@gioia.aioe.org> <1bdu7zohmx63b$.dlg@b.rose.tmpbox.news.arcor.de> <s5q5i8$mc2$1@gioia.aioe.org> <1dcrggb5j969v$.dlg@b.rose.tmpbox.news.arcor.de>

Show Full Headers
Complete Article Headers
Message-ID: <s5shs8$1c2t$1@gioia.aioe.org>
Subject: Re: Dialog signature delimiter
Date: Thu, 22 Apr 2021 21:13:21 +0200
From: bill <bill@spam.invalid>
References: <s5ilpb$kd9$1@gioia.aioe.org> <s5ir5o$7qt$1@tncsrv09.home.tnetconsulting.net> <s5irtv$ene$1@gioia.aioe.org> <s5iu6t$84h$1@tncsrv09.home.tnetconsulting.net> <w1ab8v93kvce$.dlg@b.rose.tmpbox.news.arcor.de> <s5jvec$5s7$1@gioia.aioe.org> <17rf3wjx02quj$.dlg@b.rose.tmpbox.news.arcor.de> <s5klfl$1ue5$1@gioia.aioe.org> <gr2vcjkxmucj.dlg@b.rose.tmpbox.news.arcor.de> <s5nsda$1lat$1@gioia.aioe.org> <1bdu7zohmx63b$.dlg@b.rose.tmpbox.news.arcor.de> <s5q5i8$mc2$1@gioia.aioe.org> <1dcrggb5j969v$.dlg@b.rose.tmpbox.news.arcor.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Organization: Aioe.org NNTP Server
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.41 (51e03d8d.9.298)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0
Nntp-Posting-Host: tKMeCZpOoHFkQLaFKeAqow.user.gioia.aioe.org
Content-Transfer-Encoding: 7bit
X-Notice: Filtered by postfilter v. 0.9.2
Lines: 123
X-Complaints-To: abuse@aioe.org