I am trying to parse a string of RTF pulled from the RTF property of a
textbox, going through it character by character
<example>
string s = textBox1.Rtf;
for (int iii = 0; iii < s.Length; iii++)
{
char c = s[iii];
DoSomething(c);
}
however, the RTF code contains a ton of backslash characters, and this
is causing them to be escaped when i'm going through each character. for
example... the RTF code starts off as "{\\rtf..."} and when i go through
it, i get the characters '{', '\', 'r' and so on, so the \\ is escaped.
How can i turn this off?
I know for a literal, i could use the @ symbol, but that seems to have
no effect here.
Thanks in advance!
Tim 4 2471
Tim Mulholland wrote: I am trying to parse a string of RTF pulled from the RTF property of a textbox, going through it character by character
example... the RTF code starts off as "{\\rtf..."} and when i go through it, i get the characters '{', '\', 'r' and so on, so the \\ is escaped. How can i turn this off?
The backslash char shows as "\\".
So you get what you have, nothing else.
What exactly are you trying to turn off? :)))
Vadim Chekan.
Hi Tim,
I think you may refer to Microsoft Office web component to find if this was
what you want.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Hi Tim,
If you want to get the non-escaped rtf text, you can replace the '\' with
'\\'.
If you have other concern, please feel free to let me know.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
I was getting errors caused by some code that checked for escaped characters
and replaced them with other things - turns out i was mistaken on the RTF
spec, and thought that it really had two backslashes, not just one, all over
the place.
My apologies at wasting your time
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:yd**************@cpmsftngxa07.phx.gbl... Hi Tim,
If you want to get the non-escaped rtf text, you can replace the '\' with '\\'. If you have other concern, please feel free to let me know.
Best regards, Jeffrey Tan Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: BTnews |
last post by:
Hi,
Can anyone here point me at a definitive guide or tutorial about using
escape characters when building SQL queries from user entered data?
I'm especially interested in info on this in regard...
|
by: Matthew Wieder |
last post by:
In my previous post, I asked about a routine which prepares a string for
an XPath query by taking care of escape characters.
Unable to find a list, I'm now wondering assumign I enclose the...
|
by: teachtiro |
last post by:
Hi,
'C' says \ is the escape character to be used when characters are
to be interpreted in an uncommon sense, e.g. \t usage in printf(),
but for printing % through printf(), i have read that %%...
|
by: Steve Litvack |
last post by:
Hello,
I have built an XMLDocument object instance and I get the following string
when I examine the InnerXml property:
<?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
|
by: Guadala Harry |
last post by:
I need to place the following into a string... How can I properly escape the
% " / < and > characters?
<table width="100%" border="0" cellspacing="0" cellpadding="4px"
class="hfAll"></Table>
...
|
by: Guadala Harry |
last post by:
I'd like to know the answer to the following question so I can know what to
expect with regard to other similar uses of escape characters and strings.
While everything works fine - I'd like to know...
|
by: pkaeowic |
last post by:
I am having a problem with the "escape" character \e. This code is in my
Windows form KeyPress event. The compiler gives me "unrecognized escape
sequence" even though this is documented in MSDN....
|
by: Darin |
last post by:
I have a form w/ a textbox and Cancel button on it. I have a routine to
handle textbox.validating, and I have the form setup so the Cancel
button is the Cancel button.
WHen the user clicks on...
|
by: Lawrence D'Oliveiro |
last post by:
The "escape" function in the "cgi" module escapes characters with special
meanings in HTML. The ones that need escaping are '<', '&' and '"'.
However, cgi.escape only escapes the quote character if...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |