Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi everyone

i need to convert a text in RTF format into a normal text

 

for example, i have a string that contain this :

 

{\rtf1\ansi\ansicpg1252\deff0\deflang2060{\fonttbl{\f0\fnil\fcharset0 Arial;}} \viewkind4\uc1\pard\b\fs20 Bruxelles: deux jours apr\'e8s la journ\'e9e internationale de la femme, Suzanne Moubarak a \'e9t\'e9 re\'e7ue au S\'e9nat par la pr\'e9sidente Anne-Marie Lizin; pr\'e9sidente du mouvement Women for Peace, l'\'e9pouse du pr\'e9sident \'e9gyptien milite activement pour l'\'e9galit\'e9 entre les hommes et les femmes.\b0\fs20 \par } 

 

how can i transform this into a normal text

 

best regards

Posted
This might be better posted in the windows section as ASP typically doesn't mess with it...haven't tried it and I'm sure someone can shoot me down, and this definitely I don't think would be a preferred approach, but off the top of my head, create a richtext text box object...think there is one of those in the windows forms (don't mess with forms much)...assign the rtf text to your value and then pull the text value, not even sure if those properties exist for that control but if I was in the situation that's were I'd start. There maybe a class in the System.Text namespace that may do it too or somewhere else, but at least this will give you some ideas to look at until a forms guru takes a look at your post.
Posted

i have posted in the ASP.NET section and i don't know why they have moved my post

because if i put the VB.NET tag in the ASP.NET section... it's webform :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...