πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #109184

There can be several β€œ words ” inside an β€œ encoded word ”.

#109184
From: Jeffβ–²Relf
Date: Wed, 07 Jan 2009 20:09
74 lines
4342 bytes
My virtual keyboard looks like this:
  JeffRelf.F-M.FM/Glyphs.PNG
  
To try it yourself, run X.EXE and click β€œ UTF ”.
X.EXE is in this X.ZIP file, along with X.TXT, its settings&help file:
  JeffRelf.F-M.FM/X.ZIP

No installer is needed,
it doesn't mess with your Regsitry or system settings.

To copy a glyph to the clipboard ( so you can paste it somewhere )
click on it ( it will highlight, selecting is copying ).
      ...........
RFC's say a header should only contain US ASCII
but, in practice, the specified CharSet ( MIME )
β˜…Shouldβ˜… apply to the header, not just the body.

So headers don't actually need β€œ encoded words ” !
Google, Windows Mail, ThunderBird and my X.EXE all
handle non-ascii ( not encoded ) in a header.

Most Chinese and Russian posts don't use encoded words.
Still, X.EXE creates encoded words ( as does Google ),
because RFC-sticklers, like 40tude Dialog, might require them.

In the header, the β€œ Subject: ” and β€œ From: ” fields
might be in a charset other than U.S. ASCII.

Internally, X.CPP uses only the UTF-16 charset.
It converts between charsets using commands like:

  #include <MLang.H>
  IMultiLanguage3  * Outlook ;  MIMECSETINFO _CharSet ;

  #define  FndCS( _CharSet )  \
    if ( ! * CharSet || Eqi( L"ISO-8859-1", CharSet )  \
    || Eqi( L"US-ASCII", CharSet ) )  \
      _CharSet.uiInternetEncoding = _8_Bit ;  \
    else  Outlook->GetCharsetInfo (  CharSet , & _CharSet ) ;

    uint _8_Bit ;  wchar_t  CharSet[ Max_IdenMime ] = L"Windows-1252" ;
  template< typename LnP_, typename Any >
    Set_CharSet( LnP_ B, Any Pat ) {  * CharSet = 0 ;  
      Set_IdenMime( B, Pat, CharSet ); FndCS( _CharSet )  }
        ..........
  CoInitialize( 0 );
  rv = CoCreateInstance( CLSID_CMultiLanguage, 0, CLSCTX_ALL
  , IID_IMultiLanguage3, ( void * * ) & Outlook );
           ...........
  FndCS( _CharSet )  _8_Bit = _CharSet.uiInternetEncoding ;
           ..........
  Sz = MultiByteToWideChar( 
      _CharSet.uiInternetEncoding, 0 , ( __LnP ) _BLines
    , er( Sz_To_Encode, MaxSh - 1 ), B_Sh, MaxSh );
          .........
  Sz_Write = WideCharToMultiByte(
    CP_UTF8, 0, B_Sh , -1 , ( __LnP ) B_Cache , MaxCache, 0 , 0 ) - 1 ;

For the β€œ From: ” field, only the userName might be non-ASCII,
so I put it on it's own line ― as you can see, looking at my headers.

Before sending a header to an NNTP server ( for posting ),
I scan through the header, remembering the last line-feed
( so I can wrap the line ) and the last space character
( so I can back-up to that point and start creating encoded words ).

From that point on, the entire line ( spaces and all )
becomes an encoded word ― or words, if it wraps to multiple lines.
There can be several β€œ words ” inside an β€œ encoded word ”.

I use β€œ Quoted Printable ” instead of β€œ Base64 ” because
Q.P. allows non-encoded ( human readable ) ASCII.

Technical Details
Message-ID: <Jeff_Relf@Seattle.2009_Jan.7|0.09pm|B>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-24hoursupport.helpdesk.mbox.zip!g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <Jeff_Relf@Seattle.2009_Jan.4|2.43pm|T> <5rac0PRaYOrxvrRXKP2GVQj_rNxxQrYZ@Sanguis.Bibimus.Corpus.edimus> <Jeff_Relf@Seattle.2009_Jan.6|3.59pm|T> <BjMdvQximwac7Uvp2Ii0R7W_L65zylPD@Sanguis.Bibimus.Corpus.edimus> <Jeff_Relf@Seattle.2009_Jan.7|0.03am|y> <XOAAkFQ6i6CvwkdQSfwYDN9_LWFWL04g@Sanguis.Bibimus.Corpus.edimus>

Show Full Headers
Complete Article Headers
Message-ID: <Jeff_Relf@Seattle.2009_Jan.7|0.09pm|B>
Subject: There can be several β€œ words ” inside an β€œ encoded word ”.
Date: Wed, 07 Jan 2009 20:09:03 +0000
From: Jeffβ–²Relf <Jeff_Relf@Seattle.Test>
References: <Jeff_Relf@Seattle.2009_Jan.4|2.43pm|T> <5rac0PRaYOrxvrRXKP2GVQj_rNxxQrYZ@Sanguis.Bibimus.Corpus.edimus> <Jeff_Relf@Seattle.2009_Jan.6|3.59pm|T> <BjMdvQximwac7Uvp2Ii0R7W_L65zylPD@Sanguis.Bibimus.Corpus.edimus> <Jeff_Relf@Seattle.2009_Jan.7|0.03am|y> <XOAAkFQ6i6CvwkdQSfwYDN9_LWFWL04g@Sanguis.Bibimus.Corpus.edimus>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-24hoursupport.helpdesk.mbox.zip!g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: alt.free.newsservers,alt.usenet.kooks,24hoursupport.helpdesk,misc.survivalism,rec.arts.drwho
Lines: 73
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net oQFn34u7R/uzcC9fJAcPUgG6yb8mOCBQbZHC9bB1bue/hHURC8
Cancel-Lock: sha1:sNaQALw+1iDNlaeM6Qj8PnqU+98=
User-Agent: JeffRelf.F-M.FM/X.ZIP