Different Language causing bugs

  • Thread starter Thread starter Atara
  • Start date Start date
A

Atara

Did you know that in Turkish strupper("i") <> "I" ?!
They have dotted i and un-dotted I, both in upper case and in lower
case...

We found it only after a complain from a Turkish client.


Where can I find more language differences, before I get more clients
complaining?

Thanks

Atara

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
* Atara said:
Did you know that in Turkish strupper("i") <> "I" ?!
They have dotted i and un-dotted I, both in upper case and in lower
case...

What's 'strupper'?
 
I guess this is the C form for
myStr.ToUpper

and in VB:

dim str1 as string = "i"
dim str2 as string = "I"
str1.ToUpper <> str2 ' Only in Turky !

Atara

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
* Atara said:
I guess this is the C form for
myStr.ToUpper

and in VB:

dim str1 as string = "i"
dim str2 as string = "I"
str1.ToUpper <> str2 ' Only in Turky !

OK, it would be the same for 'UCase', I assume. Can you post the
character code of the characters you are comparing? You can determine
the character code using 'AscW'.
 
Ascw(i) = 105
Ascw(I) = 73
but they are not a pair in Turkish.
We already removed the turkish from our testing machine, so I cannot
tell you what is the unicode of the Capital-Dotted-I and the
Lower-unDotted-i

My question is: Does anyone knows about other bugs that are specific to
a language?

Atara




*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Atara,
Have you tried asking this "down the hall" in the
microsoft.public.dotnet.internationalization newsgroup?

Remember that .NET uses Unicode, that Windows XP & Windows 2000 both support
Unicode, you should not need Turkish installed on your machine per se.

You should be able to use Character Map (Start - Programs - Accessories -
System Tools) to find the characters. From your description are you
referring to "U+0130: Latin Capital Letter I with Dot Above" ChrW(130) and
"U+0131: Latin Small Letter Dotless I" ChrW(131)? I don't know Turkish so I
don't know if it falls within the Latin characters or its "by itself" like
Greek, Cyrillic, Hebrew, Arabic or other...

I'm not seeing a problem comparing the above characters in VS.NET 2003.

For a plethora of information on Unicode in .NET see:
http://www.yoda.arachsys.com/csharp/unicode.html

Hope this helps
Jay
 
Thank you all.

Our program failed in Turkey because we used code that relied on the
'fault' assumption that "i".ToUpper = "I"

* The only way we could specify the problem was by installing Turkish
OS.
* I fixed the bug by creating the upperCase string using -
Dim deltaAscii As Integer = 97-65 ' Asc("a")=97, Asc("A")=65
For Each strChar In myStr
intAsc = AscW(strChar)
If (intAsc >= AscW("a")) And (intAsc <= AscW("z")) Then
strUpper = strUpper & Chr(intAsc - deltaAscii)

I am looking for a site that will include information about
specification of languages that might cause other bugs.

Are you aware of such a site?

Thanks
Atara.


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Atara,
I am looking for a site that will include information about
specification of languages that might cause other bugs.
Are they bugs? Did you contact MS directly to verify they are bugs?

I would contact Microsoft directly if I suspected an alleged bug in the
framework that did not allow me to compare "i" to "I"!
Are you aware of such a site?
In addition to the links below try asking this "down the hall" in the
microsoft.public.dotnet.internationalization newsgroup I suspect will offer
you a plethora of more sites!


Note: I would strongly discourage your code to "workaround" this problem as
you may actually be introducing new problems for other cultures!

I would make sure that I was using the "correct" compare method. In addition
to the "=" operator, there is String.Compare & String.CompareOridinal with
overloads. I would make sure I had a good understanding (or at least good
enough) of cultures & how strings worked in the various cultures.

For example:

Imports System.Globalization

' This is effectively what "string1.ToUpper() = string2.ToUpper()" does:
If String.Compare(string1, string2, True, CultureInfo.CurrentCulture) =
0 Then

' This is effectively what you loop is trying to do:
If String.Compare(string1, string2, True, CultureInfo.InvariantCulture)
= 0 Then


For details on compare strings see:

http://msdn.microsoft.com/library/d...e/html/cpconsortingdataforspecificculture.asp

http://msdn.microsoft.com/library/d.../cpconculture-insensitivestringoperations.asp

Interesting enough this page talks about your "bug"!

http://msdn.microsoft.com/library/d.../html/cpconcustomcasemappingssortingrules.asp

http://msdn.microsoft.com/library/d...ormingculture-insensitivestringoperations.asp

Plus any sub topics of the above...

Hope this helps
Jay
 
Back
Top