Hi,

I would like to get the filename from a POP connection. It works fine. However, if the filename contains a '%', it uuencode to '%25'. How do I disable it?

e.g.

my filename is 'Sales forecast with 50 % market shares.doc'

string filename = message.Attachments[0].FilenName ;

The result is filename : 'Sales forecast with 50 %25 market shares.doc'

I am using c#.NET

Many thanks, Eddie

asked 06 Jun '10, 07:03

Eddie's gravatar image

Eddie
324
accept rate: 0%

edited 10 Aug '10, 13:16

Rebex%20KB's gravatar image

Rebex KB ♦♦
256312


This looks like a side-effect of a routine that "fixes" characters that are invalid for a filename. We will fix this issue in the next release. In the meantime, please use this instead:

string filename = message.Attachments[0].FileName.Replace("%25", "%");

Sorry for inconvenience, and thanks for letting us know about this!

link

answered 07 Jun '10, 12:16

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

Thanks Lukas, no problem. We can work around that. Cheers

(17 Aug '10, 22:46) Eddie
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×46
×33
×10
×2
×1

Asked: 06 Jun '10, 07:03

Seen: 584 times

Last updated: 10 Aug '10, 13:16