473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

String Comparsion on Different Locale Machine

Hi
i m using

string szServerType = "Windows";
if(szServerType.ToUpper() == "WINDOWS")
{
//do some thing
}

it runs fine on my Machine, but when i try to run this code on my
clients machine which is in Turkish ... it dosnt compare this and return
false.
any help how to comapre plan string with same results on every locale OS.
any help would be appriciateable.

aSIM.
Dec 21 '06 #1
1 879
thanks Skalecki,
.Equals("windows", StringComparison.InvariantCultureIgnoreCase) is
supported in 2.0 only n i m working on 1.1, anyother 1.1 compatible
solution.


aSIM.

"Milosz Skalecki" <mi*****@REMOVEITwp.plwrote in message
news:91**********************************@microsof t.com...
Howdy,

string szServerType = "Windows";

if (szServerType.Equals("windows",
StringComparison.InvariantCultureIgnoreCase))
{
// do something
}
--
Milosz Skalecki
MCAD
"Asim Qazi" wrote:
Hi
i m using

string szServerType = "Windows";
if(szServerType.ToUpper() == "WINDOWS")
{
//do some thing
}

it runs fine on my Machine, but when i try to run this code on my
clients machine which is in Turkish ... it dosnt compare this and return
false.
any help how to comapre plan string with same results on every locale
OS.


any help would be appriciateable.

aSIM.


Dec 21 '06 #2

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

Similar topics

28
by: David Rubin | last post by:
I looked on google for an answer, but I didn't find anything short of using boost which sufficiently answers my question: what is a good way of doing string tokenization (note: I cannot use boost)....
12
by: Flzw | last post by:
How to convert a std::string to a WCHAR* ? is there any methods or something ? I can't find. Thanks
3
by: Stefan Leitich | last post by:
hi! i am developing with version 7.3.2 under cygwin. my production evironment is 7.3.3 on a suse machine. language settings (lc_...) for the server are on developing and production machine the...
8
by: Brand Bogard | last post by:
Does the C standard include a library function to convert an 8 bit character string to a 16 bit character string?
10
by: v4vijayakumar | last post by:
1. why the following program is not working as expected? #include <iostream> using namespace std; int main() { string t("test"); wcout << (wchar_t *) t.c_str() << endl; wcout << t.c_str()...
10
by: Dancefire | last post by:
Hi, everyone, I'm writing a program using wstring(wchar_t) as internal string. The problem is raised when I convert the multibyte char set string with different encoding to wstring(which is...
33
by: Michael B Allen | last post by:
Hello, Early on I decided that all text (what most people call "strings" ) in my code would be unsigned char *. The reasoning is that the elements of these arrays are decidedly not signed. In...
12
by: param | last post by:
Hi All, I want to use %x as directive to get the locale specific date representation. But, at the same time, i want to know the format of the output for interpreting it through program. Is there...
3
by: SimonPalmer | last post by:
anyone recommend a way of formatting floats with comma separators? e.g. 500000.00 -500,000.00
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
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
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...

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.