Community Discussions and Support
attachment with the identifier filename*=UTF-8''

Did some testing and found this?


Did a test. Sent myself a message with 17K pdf file.
Have this line added to VIEWER.PM
2;application/octet-stream;.pdf;-

Copied the original CNM file to A.CNM and copied lines form original message
diff shows.

44c44
< X-PMFLAGS: 570957824 0 1 P49MVR3B.CNM
---
> X-PMFLAGS: 570957824 0 1 A.CNM
84,86c84,87
< Content-type: Application/Octet-stream; name="outlook.pdf"; type=PDF-FILE
< Content-disposition: attachment; filename="outlook.pdf"
< Content-transfer-encoding: BASE64
---
> name=UTF-8''Geb%C3%A4ude.pdf
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
> filename=UTF-8''Geb%C3%A4ude.pdf

Withe the A.CNM was able to save the attachment But it used the name - for the attachment?
Perhaps the ;- in VIEWER.PM line?

Created a B.CNM file the these changes to lines.
Changing the file name to the to the UTF8 name
Saving or opening worked.

diff output

44c44
< X-PMFLAGS: 570957824 0 1 P49MVR3B.CNM
---
> X-PMFLAGS: 570957824 0 1 B.CNM
84,85c84
< Content-type: Application/Octet-stream; name="outlook.pdf"; type=PDF-FILE
< Content-disposition: attachment; filename="outlook.pdf"
---
> Content-type: Application/Octet-stream; name=UTF-8''Geb%C3%A4ude.pdf; type=PDF-FILE
86a86
> Content-disposition: attachment; filename=UTF-8''Geb%C3%A4ude.pdf

The created saved files gave.
17757 Apr 15 22:00 -
17757 Apr 15 22:07 UTF-8''Geb%C3%A4ude.pdf

Original file
17757 Oct 2 2024 outlook.pdf
Did some testing and found this? ```` Did a test. Sent myself a message with 17K pdf file. Have this line added to VIEWER.PM 2;application/octet-stream;.pdf;- Copied the original CNM file to A.CNM and copied lines form original message diff shows. 44c44 &lt; X-PMFLAGS: 570957824 0 1 P49MVR3B.CNM --- &gt; X-PMFLAGS: 570957824 0 1 A.CNM 84,86c84,87 &lt; Content-type: Application/Octet-stream; name=&quot;outlook.pdf&quot;; type=PDF-FILE &lt; Content-disposition: attachment; filename=&quot;outlook.pdf&quot; &lt; Content-transfer-encoding: BASE64 --- &gt; name=UTF-8&#039;&#039;Geb%C3%A4ude.pdf &gt; Content-Transfer-Encoding: base64 &gt; Content-Disposition: attachment; &gt; filename=UTF-8&#039;&#039;Geb%C3%A4ude.pdf Withe the A.CNM was able to save the attachment But it used the name - for the attachment? Perhaps the ;- in VIEWER.PM line? Created a B.CNM file the these changes to lines. Changing the file name to the to the UTF8 name Saving or opening worked. diff output 44c44 &lt; X-PMFLAGS: 570957824 0 1 P49MVR3B.CNM --- &gt; X-PMFLAGS: 570957824 0 1 B.CNM 84,85c84 &lt; Content-type: Application/Octet-stream; name=&quot;outlook.pdf&quot;; type=PDF-FILE &lt; Content-disposition: attachment; filename=&quot;outlook.pdf&quot; --- &gt; Content-type: Application/Octet-stream; name=UTF-8&#039;&#039;Geb%C3%A4ude.pdf; type=PDF-FILE 86a86 &gt; Content-disposition: attachment; filename=UTF-8&#039;&#039;Geb%C3%A4ude.pdf The created saved files gave. 17757 Apr 15 22:00 - 17757 Apr 15 22:07 UTF-8&#039;&#039;Geb%C3%A4ude.pdf Original file 17757 Oct 2 2024 outlook.pdf ````

mikes@guam.net

Did some screen of the attachment screens.
69df87aa534db
69df87bb0856d


If I click on attachment with UTF file name it created A4R307RG.pdf file in my user Temp directory and opened it.


With original coding, I can click on the save option and enter a name or use the -.
The file is saved and can open it with viewer. The same and edit option doesn't work to save or open it.


The B.CNM option does work.


Don't know if there is an option that would work to better pass the file name.
Just wanted to test with as little changes as necessary.
Wonder what program originally created the email.


Did some screen of the attachment screens. ![69df87aa534db](serve/attachment&amp;path=69df87aa534db) ![69df87bb0856d](serve/attachment&amp;path=69df87bb0856d) If I click on attachment with UTF file name it created A4R307RG.pdf file in my user Temp directory and opened it. With original coding, I can click on the save option and enter a name or use the -. The file is saved and can open it with viewer. The same and edit option doesn&#039;t work to save or open it. The B.CNM option does work. Don&#039;t know if there is an option that would work to better pass the file name. Just wanted to test with as little changes as necessary. Wonder what program originally created the email.

mikes@guam.net

I heard back from the developer, Mr. David Harris.


He states that the filename headers are illegal in that they don't follow the syntax mandated by both RFC2231 and RFC5987.


An example is this header:
filename=UTF-8''Geb%C3%A4ude.pdf


To be legal it should be:
filename*=UTF-8''Geb%C3%A4ude.pdf
(note the asterisk)


The asterisk is mandated as an indicator of extended encoding. A manual edit of the .cnm to add the asterisk should work. @Duke , please test that.

As for a future workaround, don't expect one. David Harris has always been adamant about Pegasus Mail adhering to RFC rules. If the sender is someone you can influence, encouraging them to fix it is recommended.


As a side comment, an improved MIME parser is in the works. It won't provide a workaround for this issue but I'm hopeful it will resolve the Content-type: application/octet-stream one.


I heard back from the developer, Mr. David Harris. He states that the filename headers are illegal in that they don&#039;t follow the syntax mandated by both RFC2231 and RFC5987. An example is this header: filename=UTF-8&#039;&#039;Geb%C3%A4ude.pdf To be legal it should be: filename*=UTF-8&#039;&#039;Geb%C3%A4ude.pdf (note the asterisk) The asterisk is mandated as an indicator of extended encoding. A manual edit of the .cnm to add the asterisk should work. @Duke , please test that. As for a future workaround, don&#039;t expect one. David Harris has always been adamant about Pegasus Mail adhering to RFC rules. If the sender is someone you can influence, encouraging them to fix it is recommended. As a side comment, an improved MIME parser is in the works. It won&#039;t provide a workaround for this issue but I&#039;m hopeful it will resolve the Content-type: application/octet-stream one.

Looking at the earlier messages, some seem to have the *= and some have just the =.


Don't have access to the original CNM file so don't know what it really has.


Know Mr. Harris likes to follow the RFCs.


long long ago, I wrote a gateway from Pegasus Mail DOS to use uucp to transfer mail thru the internet. RFC said lines were to only be 998 characters max plus the cr/lf so 1000 characters. Then outlook came out, and the would write entire paragraphs a a single long line. So my gateway would crash. No way to get Microsoft to follow rules, so just had to increase the line buffer to I believe 32K and it stopped crashes.


Don't know if it is the version line or changing content lines that seems to allow it with my test message to open the files. Will play with it a little more.


Interesting.


Looking at the earlier messages, some seem to have the *= and some have just the =. Don&#039;t have access to the original CNM file so don&#039;t know what it really has. Know Mr. Harris likes to follow the RFCs. long long ago, I wrote a gateway from Pegasus Mail DOS to use uucp to transfer mail thru the internet. RFC said lines were to only be 998 characters max plus the cr/lf so 1000 characters. Then outlook came out, and the would write entire paragraphs a a single long line. So my gateway would crash. No way to get Microsoft to follow rules, so just had to increase the line buffer to I believe 32K and it stopped crashes. Don&#039;t know if it is the version line or changing content lines that seems to allow it with my test message to open the files. Will play with it a little more. Interesting.

mikes@guam.net

Did a little more testing (But have not gotten a look at the original CNM file so may not be fully valid.


Created email files S2.CNM and S3.CNM
diffs are as follows. Note 2nd line is same if ignore case.


diff S2.CNM S3.CNM 
84,86c84,86
< Content-type: Application/Octet-stream; name=UTF-8''Geb%C3%A4ude.pdf; type=PDF-FILE
< Content-transfer-encoding: BASE64
< Content-disposition: attachment; filename*=UTF-8''Geb%C3%A4ude.pdf
---
> Content-Type: application/pdf; name="Gebäude.pdf"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="Gebäude.pdf"

Both seem to work, but Pegasus does use the filename correct with the UTF-8 character actually in the name while has file name with UTF-8 in original one.
AI also said the type=PDF-File was redundant??


Again, I have in VIEWER.PM this line
2;application/octet-stream;.pdf;Z:\usr\bin\pegattach
not 100% sure it is doing anything. Since didn't recreate the original file with PDF.


The second one did user the correct name.


Did just replace the 17K PDF file manually in messages with a smaller 1.
took text file with just pdftext (just 8 character) created a large PDF using libreoffice.
Then use soda web site and created a much smaller on 2387 characters.
Then used base64 to encode it. Then pasted it in message.


Removed some header lines.


From: "Michael D. Setzer II" <mikes@guam.net>
To: mikes@guam.net
Date: Wed, 15 Apr 2026 21:44:03 +1000
MIME-Version: 1.0
Content-type: Multipart/Mixed; boundary=Message-Boundary-14142
Subject: test pdf
Reply-to: mikes@guam.net
Message-ID: <69DF7A03.24923.CEC99BD@mikes.guam.net>
X-Confirm-Reading-To: mikes@guam.net
X-pmrqc: 1
Return-receipt-to: mikes@guam.net
Priority: normal
X-mailer: Pegasus Mail for Windows (v4.91.1746)
X-PMFLAGS: 570957824 0 1 B.CNM


--Message-Boundary-14142
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

test
+------------------------------------------------------------+
Michael D. Setzer II - Computer Science Instructor (Retired)
mailto:mikes@guam.net
mailto:msetzerii@gmail.com
mailto:msetzerii@gmx.com
Guam - Where America's Day Begins
G4L Disk Imaging Project maintainer
http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+




--Message-Boundary-14142
Content-type: text/plain
; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: soda.pdf
Date: 2 Oct 2024, 15:22
Size: 2387 bytes.
Type: PDF-FILE

--Message-Boundary-14142
Content-Type: application/pdf; name="Gebäude.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Gebäude.pdf"

JVBERi0yLjAKJbq63toKNSAwIG9iajw8L0xpbmVhcml6ZWQgMS9MIDE3NjUvTyA4L0UgMTI5OC9O
IDEvVCAxNDc4L0ggWyA1OTIgMzAwXT4+CmVuZG9iagogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo2IDAgb2JqPDwvUm9v
dCA3IDAgUi9JbmZvIDMgMCBSL0lEWzxEMTczNDk4ODM5RjRDMEZGNjBGMEJBREZGNTA5OEM4QT48
RUM0QkZCQUEwODMyRUY4RkE5NjBENkFCNUMxQTg2RjM+XS9TaXplIDEzL1ByZXYgMTQ3OS9MZW5n
dGggMzkvVHlwZS9YUmVmL0ZpbHRlci9GbGF0ZURlY29kZS9EZWNvZGVQYXJtczw8L0NvbHVtbnMg
My9QcmVkaWN0b3IgMTI+Pi9JbmRleFs1IDhdL1dbMSAyIDBdPj5zdHJlYW0KeJxjYmTgZ2JgO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QrkAuAIx1DdAKZW5kc3RyZWFtCmVuZG9iagoxIDAgb2JqPDwvVHlw
ZS9PYmpTdG0vTiAyL0ZpcnN0IDkvRmlsdGVyL0ZsYXRlRGVjb2RlL0xlbmd0aCA5Mj4+c3RyZWFt
CnicM1IwUDBWMDZVsLHRD6ksSNUPSExPLdb3zkwpjrYAygXF6jvnl+aVKBja2QGVOBelJpZk5ue5
JJakarhYGRkYmRmYGJoaWpgamBhFaer75qfgkLKzAwBEvxzcCmVuZHN0cmVhbQplbmRvYmoKNCAw
IG9iajw8L1Jvb3QgNyAwIFIvSW5mbyAzIDAgUi9JRFs8RDE3MzQ5ODgzOUY0QzBGRjYwRjBCQURG
RjUwOThDOEE+PEVDNEJGQkFBMDgzMkVGOEZBOTYwRDZBQjVDMUE4NkYzPl0vU2l6ZSA1L0xlbmd0
aCAzMC9UeXBlL1hSZWYvRmlsdGVyL0ZsYXRlRGVjb2RlL0RlY29kZVBhcm1zPDwvQ29sdW1ucyA1
L1ByZWRpY3RvciAxMj4+L0luZGV4WzAgNV0vV1sxIDIgMl0+PnN0cmVhbQp4nGNiAAEmRlYhEPn7
PZAECTAy/Wc9xvAfACj6BNgKZW5kc3RyZWFtCmVuZG9iagpzdGFydHhyZWYKMjE1CiUlRU9GCg==

--Message-Boundary-14142--

Again, without the original CNM file note sure what would be simplest change.
Perhaps the VIEWER.PM change, or actually change the lines with a sed like command or a program. Since Pegasus seems to handle the UTF characters in name, changing that as well. Just intestesting..


Did a little more testing (But have not gotten a look at the original CNM file so may not be fully valid. Created email files S2.CNM and S3.CNM diffs are as follows. Note 2nd line is same if ignore case. ```` diff S2.CNM S3.CNM 84,86c84,86 &lt; Content-type: Application/Octet-stream; name=UTF-8&#039;&#039;Geb%C3%A4ude.pdf; type=PDF-FILE &lt; Content-transfer-encoding: BASE64 &lt; Content-disposition: attachment; filename*=UTF-8&#039;&#039;Geb%C3%A4ude.pdf --- &gt; Content-Type: application/pdf; name=&quot;Geb&auml;ude.pdf&quot; &gt; Content-Transfer-Encoding: base64 &gt; Content-Disposition: attachment; filename=&quot;Geb&auml;ude.pdf&quot; ```` Both seem to work, but Pegasus does use the filename correct with the UTF-8 character actually in the name while has file name with UTF-8 in original one. AI also said the type=PDF-File was redundant?? Again, I have in VIEWER.PM this line 2;application/octet-stream;.pdf;Z:\usr\bin\pegattach not 100% sure it is doing anything. Since didn&#039;t recreate the original file with PDF. The second one did user the correct name. Did just replace the 17K PDF file manually in messages with a smaller 1. took text file with just pdftext (just 8 character) created a large PDF using libreoffice. Then use soda web site and created a much smaller on 2387 characters. Then used base64 to encode it. Then pasted it in message. Removed some header lines. ```` From: &quot;Michael D. Setzer II&quot; &lt;mikes@guam.net&gt; To: mikes@guam.net Date: Wed, 15 Apr 2026 21:44:03 +1000 MIME-Version: 1.0 Content-type: Multipart/Mixed; boundary=Message-Boundary-14142 Subject: test pdf Reply-to: mikes@guam.net Message-ID: &lt;69DF7A03.24923.CEC99BD@mikes.guam.net&gt; X-Confirm-Reading-To: mikes@guam.net X-pmrqc: 1 Return-receipt-to: mikes@guam.net Priority: normal X-mailer: Pegasus Mail for Windows (v4.91.1746) X-PMFLAGS: 570957824 0 1 B.CNM --Message-Boundary-14142 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body test +------------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor (Retired) mailto:mikes@guam.net mailto:msetzerii@gmail.com mailto:msetzerii@gmx.com Guam - Where America&#039;s Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +------------------------------------------------------------+ --Message-Boundary-14142 Content-type: text/plain; charset=US-ASCII Content-disposition: inline Content-description: Attachment information. The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: soda.pdf Date: 2 Oct 2024, 15:22 Size: 2387 bytes. Type: PDF-FILE --Message-Boundary-14142 Content-Type: application/pdf; name=&quot;Geb&auml;ude.pdf&quot; Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=&quot;Geb&auml;ude.pdf&quot; JVBERi0yLjAKJbq63toKNSAwIG9iajw8L0xpbmVhcml6ZWQgMS9MIDE3NjUvTyA4L0UgMTI5OC9O IDEvVCAxNDc4L0ggWyA1OTIgMzAwXT4+CmVuZG9iagogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo2IDAgb2JqPDwvUm9v dCA3IDAgUi9JbmZvIDMgMCBSL0lEWzxEMTczNDk4ODM5RjRDMEZGNjBGMEJBREZGNTA5OEM4QT48 RUM0QkZCQUEwODMyRUY4RkE5NjBENkFCNUMxQTg2RjM+XS9TaXplIDEzL1ByZXYgMTQ3OS9MZW5n dGggMzkvVHlwZS9YUmVmL0ZpbHRlci9GbGF0ZURlY29kZS9EZWNvZGVQYXJtczw8L0NvbHVtbnMg My9QcmVkaWN0b3IgMTI+Pi9JbmRleFs1IDhdL1dbMSAyIDBdPj5zdHJlYW0KeJxjYmTgZ2JgOMHE wOTLxMAYAcRtTIx/2Jn+s7QxMfw7CABAawZkCmVuZHN0cmVhbQplbmRvYmoKc3RhcnR4cmVmCjAK JSVFT0YKICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo3IDAgb2JqPDwvVHlwZS9DYXRhbG9n L1BhZ2VzIDIgMCBSPj4KZW5kb2JqCjEyIDAgb2JqPDwvUyAzNi9GaWx0ZXIvRmxhdGVEZWNvZGUv TGVuZ3RoIDQxPj5zdHJlYW0KeJxjYGBgZmBgCmAAAsZpDHAAZTMBMQtCFKQWjBkYmhlYrBgYAEuj AlEKZW5kc3RyZWFtCmVuZG9iagogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAg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4NkYzPl0vU2l6ZSA1L0xlbmd0 aCAzMC9UeXBlL1hSZWYvRmlsdGVyL0ZsYXRlRGVjb2RlL0RlY29kZVBhcm1zPDwvQ29sdW1ucyA1 L1ByZWRpY3RvciAxMj4+L0luZGV4WzAgNV0vV1sxIDIgMl0+PnN0cmVhbQp4nGNiAAEmRlYhEPn7 PZAECTAy/Wc9xvAfACj6BNgKZW5kc3RyZWFtCmVuZG9iagpzdGFydHhyZWYKMjE1CiUlRU9GCg== --Message-Boundary-14142-- ```` Again, without the original CNM file note sure what would be simplest change. Perhaps the VIEWER.PM change, or actually change the lines with a sed like command or a program. Since Pegasus seems to handle the UTF characters in name, changing that as well. Just intestesting..

mikes@guam.net

The asterisk is mandated as an indicator of extended encoding. A manual edit of the .cnm to add the asterisk should work. @Duke , please test that.

The asterisk is in the original email! Just as I mentioned in the post's subject line. The forum editor must have removed the asterisk. I just ran into the same problem again. An asterisk is a symbol used for italicized text.


Here's a screenshot of the attachment:
69e0f64eb2e82


I send the e-mail to mikes (at) guam.net, too.


[quote=&quot;pid:58875, uid:28772&quot;]The asterisk is mandated as an indicator of extended encoding. A manual edit of the .cnm to add the asterisk should work. @Duke , please test that.[/quote] The asterisk is in the original email! Just as I mentioned in the post&#039;s subject line. The forum editor must have removed the asterisk. I just ran into the same problem again. An asterisk is a symbol used for italicized text. Here&#039;s a screenshot of the attachment: ![69e0f64eb2e82](serve/attachment&amp;path=69e0f64eb2e82) I send the e-mail to mikes (at) guam.net, too.

I mentioned David Harris's comment about a new MIME parser in the works. Part of that comment was an explanation of the ability of the current parser which I misread. He clearly stated that the current parser would not handle it but my brain registered the opposite. I apologize for that.


he forum editor must have removed the asterisk. I just ran into the same problem again. An asterisk is a symbol used for italicized text.


I know about this forum and its asterisk handling issue. I should have thought to ask or to look back in the discussion.


I mentioned David Harris&#039;s comment about a new MIME parser in the works. Part of that comment was an explanation of the ability of the current parser which I misread. He clearly stated that the current parser would not handle it but my brain registered the opposite. I apologize for that. [quote=&quot;pid:58881, uid:2277&quot;]he forum editor must have removed the asterisk. I just ran into the same problem again. An asterisk is a symbol used for italicized text.[/quote] I know about this forum and its asterisk handling issue. I should have thought to ask or to look back in the discussion.
edited 3 days ago at 4:30 pm

Got a copy of a similar message.
Doing testing Seems that Pegasus Mail doesn't support the UTF8 *= or other method.


Seems my earlier attempt wasn't doing exactly what I though with the name without encode. Rather than putting the UTF-8 character it was treating it as two extended Ascii characters in this case the first one is similar to character but second come makes like and fancy f.


This is best I seem to do to clean up the message to than then lets Pegasus Process it. Just the Name isn't exactly the same.


Copy original file to a new name
cp Y3IA3IVN.CNM Y3Z.CNM


Use sed to fix the file.
First part basically remove * before the =
Second part remove the UTF-8''


sed   -i "s/name.=/name=/g;s/UTF-8''//g" Y3Z.CNM
$ diff Y3IA3IVN.CNM.org Y3Z.CNM
58c58
< name*=UTF-8''Geb%C3%A4ude.pdf
> name=Geb%C3%A4ude.pdf
61c61
< filename*=UTF-8''Geb%C3%A4ude.pdf
> filename=Geb%C3%A4ude.pdf

Just clicking on the attachment will open it, with Pegasus creating a random name.
Clicking on the save will save it using the name with %C3%A4 so don't get the original name with the UTF-8.
Click the safe and exit the same.


On could manually edit the CNM file and make same changes.
Used linux sed, but sure there is a similar windows process.
So looks like current parser doesn't like UTF-8 for filenames.


Got a copy of a similar message. Doing testing Seems that Pegasus Mail doesn&#039;t support the UTF8 *= or other method. Seems my earlier attempt wasn&#039;t doing exactly what I though with the name without encode. Rather than putting the UTF-8 character it was treating it as two extended Ascii characters in this case the first one is similar to character but second come makes like and fancy f. This is best I seem to do to clean up the message to than then lets Pegasus Process it. Just the Name isn&#039;t exactly the same. Copy original file to a new name cp Y3IA3IVN.CNM Y3Z.CNM Use sed to fix the file. First part basically remove * before the = Second part remove the UTF-8&#039;&#039; ```` sed -i &quot;s/name.=/name=/g;s/UTF-8&#039;&#039;//g&quot; Y3Z.CNM $ diff Y3IA3IVN.CNM.org Y3Z.CNM 58c58 &lt; name*=UTF-8&#039;&#039;Geb%C3%A4ude.pdf &gt; name=Geb%C3%A4ude.pdf 61c61 &lt; filename*=UTF-8&#039;&#039;Geb%C3%A4ude.pdf &gt; filename=Geb%C3%A4ude.pdf ```` Just clicking on the attachment will open it, with Pegasus creating a random name. Clicking on the save will save it using the name with %C3%A4 so don&#039;t get the original name with the UTF-8. Click the safe and exit the same. On could manually edit the CNM file and make same changes. Used linux sed, but sure there is a similar windows process. So looks like current parser doesn&#039;t like UTF-8 for filenames.

mikes@guam.net


... the forum editor must have removed the asterisk. I just ran into the same problem again. An asterisk is a symbol used for italicized text.


I know about this forum and its asterisk handling issue. I should have thought to ask or to look back in the discussion.



This can be prevented by adding a preceding backslash as "escape character": Test*Test. And, BTW, the preview pane on the right displays the effects.


&gt; ... the forum editor must have removed the asterisk. I just ran into the same problem again. An asterisk is a symbol used for italicized text. &gt; I know about this forum and its asterisk handling issue. I should have thought to ask or to look back in the discussion. This can be prevented by adding a preceding backslash as &quot;escape character&quot;: Test\*Test. And, BTW, the preview pane on the right displays the effects.
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C
edited 2 days ago at 9:03 pm

Seems to me the Pegasus Parser doesn't handle UTF-8 convertion correctly with the *=, and if one puts the UTF-8 code in, it treats them as two extended ascii characters.


So, played with a program to actually extract the pdf file and use the correct utf-8 file name. Result works with the test message I got from kuck, but not sure it would work with all version. Actual code I use has a few things that linux required since its base64 doesn't like the DOS CR/LF, so if doing a windows version, that would be removed.


Resulds.


 4684 Apr 17 20:37 Y3IA3IVN.CNM
1851 Apr 17 23:00 filter3b.cpp
7044 Apr 17 23:00 filter3b
1744 Apr 17 23:01 Gebäude.pdf.base64
1289 Apr 17 23:01 Gebäude.pdf
#include <filesystem>
#include <cstring>
#define remove_charat(a, b) memmove((a), (a)+(b), strlen((a)) - (b) + 1)
using namespace std;

// Program to show concept to pull UTF-8 pdf from the CNM file I got from duke.
// CNM File is a DOS CR/LF file so this program removes the CR to work with linux base64

int main()
{
FILE *fp1,*fp2;
char line[1024],*p1,filename[30]="",filenameb[30],hex3char[3],cmdline[80];
unsigned int val;
// Currently hardcoded with CNM file name.
fp1=fopen("Y3IA3IVN.CNM", "r");
if(fp1==nullptr) exit(128);
// Reads file to find the name* line (Ignore that part of message)
while(!feof(fp1))
{
fgets(line,1024,fp1);
if(strstr(line,"name*")) break;
}
// To get the UTF file name ignore up to the ''
if((p1=strchr(line,'\'')))
{
strcpy(filename,p1+2);
// this converts the encode %xx to the hex values
while((p1=strchr(filename,'%')))
{
hex3char[0]=*(p1+1);
hex3char[1]=*(p1+2);
hex3char[2]=0;
sscanf(hex3char, "%x", &val);
*p1=val;
remove_charat(p1+1,2);
}
}
// Remove the CR from String (linux)
if((p1=strchr(filename,'\r'))) *p1=0;
// create filename to have base64 code lines.
strcpy(filenameb,filename);
strcat(filenameb,".base64");
// ignore some header lines to get the base64 lines
while(strlen(line)<74) fgets(line,1024,fp1);

fp2=fopen(filenameb, "w");
if(fp1==nullptr) exit(128);
while(strlen(line)>2)
{
if((p1=strchr(line,13))) remove_charat(p1,1); // linux base64 doesn't like CR
fprintf(fp2,"%s",line);
fgets(line,1024,fp1);
}
fclose(fp1);
fclose(fp2);
// Added code to decode the base64 file to pdf file with the UTF-8 character file name
sprintf(cmdline,"base64 -d %s > %s;evince %s",filenameb,filename,filename);
// run command to convert and open pdf file.
system(cmdline);
return(0);
}

So, it can be done. Was fun to play with doing it.


Seems to me the Pegasus Parser doesn&#039;t handle UTF-8 convertion correctly with the *=, and if one puts the UTF-8 code in, it treats them as two extended ascii characters. So, played with a program to actually extract the pdf file and use the correct utf-8 file name. Result works with the test message I got from kuck, but not sure it would work with all version. Actual code I use has a few things that linux required since its base64 doesn&#039;t like the DOS CR/LF, so if doing a windows version, that would be removed. Resulds. ```` 4684 Apr 17 20:37 Y3IA3IVN.CNM 1851 Apr 17 23:00 filter3b.cpp 7044 Apr 17 23:00 filter3b 1744 Apr 17 23:01 Geb&auml;ude.pdf.base64 1289 Apr 17 23:01 Geb&auml;ude.pdf ```` ```` #include &lt;filesystem&gt; #include &lt;cstring&gt; #define remove_charat(a, b) memmove((a), (a)+(b), strlen((a)) - (b) + 1) using namespace std; // Program to show concept to pull UTF-8 pdf from the CNM file I got from duke. // CNM File is a DOS CR/LF file so this program removes the CR to work with linux base64 int main() { FILE *fp1,*fp2; char line[1024],*p1,filename[30]=&quot;&quot;,filenameb[30],hex3char[3],cmdline[80]; unsigned int val; // Currently hardcoded with CNM file name. fp1=fopen(&quot;Y3IA3IVN.CNM&quot;, &quot;r&quot;); if(fp1==nullptr) exit(128); // Reads file to find the name* line (Ignore that part of message) while(!feof(fp1)) { fgets(line,1024,fp1); if(strstr(line,&quot;name*&quot;)) break; } // To get the UTF file name ignore up to the &#039;&#039; if((p1=strchr(line,&#039;\&#039;&#039;))) { strcpy(filename,p1+2); // this converts the encode %xx to the hex values while((p1=strchr(filename,&#039;%&#039;))) { hex3char[0]=*(p1+1); hex3char[1]=*(p1+2); hex3char[2]=0; sscanf(hex3char, &quot;%x&quot;, &amp;val); *p1=val; remove_charat(p1+1,2); } } // Remove the CR from String (linux) if((p1=strchr(filename,&#039;\r&#039;))) *p1=0; // create filename to have base64 code lines. strcpy(filenameb,filename); strcat(filenameb,&quot;.base64&quot;); // ignore some header lines to get the base64 lines while(strlen(line)&lt;74) fgets(line,1024,fp1); fp2=fopen(filenameb, &quot;w&quot;); if(fp1==nullptr) exit(128); while(strlen(line)&gt;2) { if((p1=strchr(line,13))) remove_charat(p1,1); // linux base64 doesn&#039;t like CR fprintf(fp2,&quot;%s&quot;,line); fgets(line,1024,fp1); } fclose(fp1); fclose(fp2); // Added code to decode the base64 file to pdf file with the UTF-8 character file name sprintf(cmdline,&quot;base64 -d %s &gt; %s;evince %s&quot;,filenameb,filename,filename); // run command to convert and open pdf file. system(cmdline); return(0); } ```` So, it can be done. Was fun to play with doing it.

mikes@guam.net

12
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft