Re: replace
From: Bob Grommes (bob_at_bobgrommes.com)
Date: 02/02/05
- Next message: SerhaD İnanlı: "Re: Update Combobox Contents"
- Previous message: trint: "Can these values be changed while printing?"
- In reply to: Etu: "Re: replace"
- Next in thread: Etu: "Re: replace"
- Reply: Etu: "Re: replace"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 2 Feb 2005 10:07:24 -0700
Etu,
Why do you think that your C# program doesn't think the strings are the same
as those in the XML file?
If you are watching this in the debugger then you will see tabs replaced
with \t, quotes replaced with \" but this is just a display convention. The
debugger wants to display all strings like C# constants, and a C# constant
can't contain a quote, so it'll be changed to \" to be syntactially correct.
And any escapable characters will be transformed to escape sequences so that
you can see they are there.
If you are reading the XML files and they don't have the backslashes then C#
won't magically add them back in.
In a similar vein, why do you think that Excel changes tabs to spaces? It
might be doing so, particularly if it doesn't understand \t but realizes
it's some kind of escape sequence and changes it to a space; or, it may know
it's a tab but disallows or transforms them in that context. But if you are
going by what your eye sees to draw this conclusion then you may be drawing
the wrong conclusion. It may well *be* a tab.
--Bob
"Etu" <etu_sho@yahoo.com> wrote in message
news:1107323506.911917.227880@l41g2000cwc.googlegroups.com...
> The problem I have is actually my program first reads some strings
> (with \t, \" and so on) from an XML file and writes these strings to an
> Excel file. After the Excel file is saved, \t becomes a space and \"
> becomes ". Then when my program later reads the strings from the Excel
> file, it doesn't think the strings are the same as those in the XML
> file.
- Next message: SerhaD İnanlı: "Re: Update Combobox Contents"
- Previous message: trint: "Can these values be changed while printing?"
- In reply to: Etu: "Re: replace"
- Next in thread: Etu: "Re: replace"
- Reply: Etu: "Re: replace"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|