|
Home > Archive > Microsoft Content Management Server > September 2005 > comparing strings
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Dariusz Tomon 2005-09-19, 6:00 pm |
| Hello
I'm trying to comparing to strings:
1. retrieved from custom xmlplaceholder:
zrodlo = fact.Placeholders["kategoria2"] as XmlPlaceholder;
esc_kat2 = Server.HtmlEncode(zrodlo.XmlAsString);
esc_kat2 = esc_kat2.Replace("<","");
esc_kat2 = esc_kat2.Replace(">","");
esc_kat2 = esc_kat2.Replace("/Zones","");
esc_kat2 = esc_kat2.Replace("/Zone","");
esc_kat2 = esc_kat2.Replace("Zones","");
kategoria2 = esc_kat2.Replace("Zone","");
String kategoria2 has my nationals characters translated into unicode and
looks like this:
"orzecznictwo do celów pozarentowych"
2. The second one is retrieved from SQL database:
selectCmd = "select * from urzond_main order by id";
myCommand = new SqlCommand(selectCmd, myConnection);
myConnection.Open();
myReader = myCommand.ExecuteReader();
while (myReader.Read())
{
kategoria1 = myReader.GetSqlString(1).ToString();
}
String kategoria1 has original national characters without being translated
into unicode:
orzecznictwo do celów pozarentowych
I cannot compare these strings 'cos they are different.
What is the best advice? Please give some code portion with an advice.
Best Regards
Darek
| |
| Stefan [MSFT] 2005-09-20, 7:48 am |
| Hi Dariusz,
that is more an html encoding question than a MCMS question.
You should better post this question to an IE/DOM/html related newsgroup.
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights
New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------
"Dariusz Tomon" <d.tomon@mazars.pl> wrote in message
news:eicTpUWvFHA.2076@TK2MSFTNGP14.phx.gbl...
> Hello
>
> I'm trying to comparing to strings:
>
> 1. retrieved from custom xmlplaceholder:
> zrodlo = fact.Placeholders["kategoria2"] as XmlPlaceholder;
>
> esc_kat2 = Server.HtmlEncode(zrodlo.XmlAsString);
>
> esc_kat2 = esc_kat2.Replace("<","");
>
> esc_kat2 = esc_kat2.Replace(">","");
>
> esc_kat2 = esc_kat2.Replace("/Zones","");
>
> esc_kat2 = esc_kat2.Replace("/Zone","");
>
> esc_kat2 = esc_kat2.Replace("Zones","");
>
> kategoria2 = esc_kat2.Replace("Zone","");
>
> String kategoria2 has my nationals characters translated into unicode and
> looks like this:
>
> "orzecznictwo do celów pozarentowych"
>
> 2. The second one is retrieved from SQL database:
>
> selectCmd = "select * from urzond_main order by id";
>
> myCommand = new SqlCommand(selectCmd, myConnection);
>
> myConnection.Open();
>
> myReader = myCommand.ExecuteReader();
>
>
>
> while (myReader.Read())
>
> {
>
> kategoria1 = myReader.GetSqlString(1).ToString();
>
> }
>
>
>
> String kategoria1 has original national characters without being
> translated into unicode:
>
> orzecznictwo do celów pozarentowych
>
>
>
> I cannot compare these strings 'cos they are different.
>
> What is the best advice? Please give some code portion with an advice.
>
> Best Regards
>
>
>
> Darek
>
>
|
|
|
|
|