473,480 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

escape sequences in resource files...

Hi All,

I'm wondering if anyone knows what I need to do to be able to use
escape sequences in a resource file?

I think I'm probably doing something stupid, but I can't think what
I'm doing wrong.

For example:
If I have a name called strAbout, with the value:
My Application developed by Me (2003)\nemail: me@hotmail.com

I would hope to see a new line between "My Application developed by Me
(2003)" and "email: me@hotmail.com"

but it doesn't work and I see "My Application developed by Me
(2003)\nemail: me@hotmail.com" verbatim.

Does anyone have a solution or can anyone tell me what I'm doing
wrong?

Thanks in advance,
Ouch...
Nov 15 '05 #1
2 1720
The XML reader escapes \n for you. Try breaking the line with a
hard-return, yourself, like

<value>My Application developed by Me (2003)
email: me@hotmail.com</value>

-vJ

<ouch> wrote in message news:2s********************************@4ax.com...
Hi All,

I'm wondering if anyone knows what I need to do to be able to use
escape sequences in a resource file?

I think I'm probably doing something stupid, but I can't think what
I'm doing wrong.

For example:
If I have a name called strAbout, with the value:
My Application developed by Me (2003)\nemail: me@hotmail.com

I would hope to see a new line between "My Application developed by Me
(2003)" and "email: me@hotmail.com"

but it doesn't work and I see "My Application developed by Me
(2003)\nemail: me@hotmail.com" verbatim.

Does anyone have a solution or can anyone tell me what I'm doing
wrong?

Thanks in advance,
Ouch...

Nov 15 '05 #2
Hi Vijay,

I tried that too, with mixed results.
I finally managed a decent solution...I think.
I did some investigation and finally used the "unescape" method to
return a non-verbatim string.

It seems to work.

Thanks,
ouch
On Wed, 10 Dec 2003 18:19:23 -0800, "Vijaye Raji"
<no************@hotmail.com> wrote:
The XML reader escapes \n for you. Try breaking the line with a
hard-return, yourself, like

<value>My Application developed by Me (2003)
email: me@hotmail.com</value>

-vJ

<ouch> wrote in message news:2s********************************@4ax.com...
Hi All,

I'm wondering if anyone knows what I need to do to be able to use
escape sequences in a resource file?

I think I'm probably doing something stupid, but I can't think what
I'm doing wrong.

For example:
If I have a name called strAbout, with the value:
My Application developed by Me (2003)\nemail: me@hotmail.com

I would hope to see a new line between "My Application developed by Me
(2003)" and "email: me@hotmail.com"

but it doesn't work and I see "My Application developed by Me
(2003)\nemail: me@hotmail.com" verbatim.

Does anyone have a solution or can anyone tell me what I'm doing
wrong?

Thanks in advance,
Ouch...


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3350
by: Thomas Philips | last post by:
I have been playing around with reading strings with embedded escape sequences from files both using readline() and codecs.open() and have a question.I create a file "test.txt" with exactly one...
2
1932
by: junky_fellow | last post by:
N869 " Each of these escape sequences shall produce a unique implementation-defined value which can be stored in a single char object. The external representations in a text file need not be...
18
7145
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...
3
5706
by: Ken | last post by:
HI: I'm reading a string that will be displayed in a MessageBox from a resource file. The string in the resource file contains escape sequences so they will be broken up into multiple lines. ...
3
17449
by: Don | last post by:
I am building a string from a combination of hardcoded string literals and user input (via textbox). I know about using @"c:\temp\filename.txt" to ignore escape sequences. Now let's say I have a...
5
2352
by: Anton81 | last post by:
Hi all! I used escape sequences to produce colour output, but a construct like print "%8s" % str_with_escape doesn't do the right thing. I suppose the padding counts the escape characters,...
4
4257
by: JJ | last post by:
Is there a way of checking that a line with escape sequences in it, has no strings in it (apart from the escape sequences)? i.e. a line with \n\t\t\t\t\t\t\t\r\n would have no string in it a...
10
2586
by: hanaa | last post by:
Hello there. $str="This is \na ball"; echo $str; Is there a way i can make the text to be as is, without expanding the escape sequences. I know that single quoted strings do not expand escape...
5
5302
by: John Ztwin | last post by:
Hello, I have a file that contains ordinary text and some special charaters in Unicode escape sequences (\uxxxx). When I read the file using e.g. StreamReader Unicode escape sequences are not...
0
7041
marktang
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,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6737
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6921
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5336
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4776
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.