471,357 Members | 1,193 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,357 software developers and data experts.

Check string for special characters

I'm reading an XML document and creating a CMS Posting for eacho specific
node but i'm trying to save the posting using the title as Posting.Name.
For this to work i have to remove all special caracters that the Name
propertie doesn't support.

Can anyone hellp me?

Thanks

Jul 21 '05 #1
4 1874
For this to work i have to remove all special caracters that the Name
propertie doesn't support.


And what characters are "special"?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #2
Characters like "/#$%&()=' or even á é õ
This are a few examples.
"Mattias Sjögren" wrote:
For this to work i have to remove all special caracters that the Name
propertie doesn't support.


And what characters are "special"?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Jul 21 '05 #3
Ricardo Jesus <Ri**********@discussions.microsoft.com> wrote:
Characters like "/#$%&()=' or even ? ? ?
This are a few examples.


A few examples aren't enough though - you need to have a very precise
specification of which characters are allowed and which aren't.
Otherwise you won't be able to write the code, and if you *could* write
the code, you wouldn't know whether or not it does what it should.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
I've solved this problem, thanks everyone

"Jon Skeet [C# MVP]" wrote:
Ricardo Jesus <Ri**********@discussions.microsoft.com> wrote:
Characters like "/#$%&()=' or even ? ? ?
This are a few examples.


A few examples aren't enough though - you need to have a very precise
specification of which characters are allowed and which aren't.
Otherwise you won't be able to write the code, and if you *could* write
the code, you wouldn't know whether or not it does what it should.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ricardo Jesus | last post: by
14 posts views Thread by Shhnwz.a | last post: by
9 posts views Thread by somenath | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.