473,399 Members | 3,656 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,399 software developers and data experts.

Different Language causing bugs


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!
Nov 20 '05 #1
7 1133
* Atara <At***@DD.com> scripsit:
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'?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

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!
Nov 20 '05 #3
* Atara <At***@DD.com> scripsit:
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'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4


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!
Nov 20 '05 #5
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
"Atara" <At***@DD.com> wrote in message
news:ui**************@TK2MSFTNGP11.phx.gbl...


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!

Nov 20 '05 #6

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!
Nov 20 '05 #7
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/de...ficculture.asp

http://msdn.microsoft.com/library/de...operations.asp

Interesting enough this page talks about your "bug"!

http://msdn.microsoft.com/library/de...rtingrules.asp

http://msdn.microsoft.com/library/de...operations.asp

Plus any sub topics of the above...

Hope this helps
Jay

"Atara" <At***@DD.com> wrote in message
news:uz**************@TK2MSFTNGP10.phx.gbl...
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!

Nov 20 '05 #8

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

Similar topics

6
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
1
by: RM | last post by:
I am using DataSet's .ReadXml() method to parse an XML file that has an inline schema and Im getting "different" results on various machines using the same myDataSet.ReadXml("myExample.xml"). ...
6
by: Cro | last post by:
Dear Access Developers, The 'Allow Additions' property of my form is causing unexpected results. I am developing a form that has its 'Default View' property set to 'Continuous Forms' and am...
134
by: evolnet.regular | last post by:
I've been utilising C for lots of small and a few medium-sized personal projects over the course of the past decade, and I've realised lately just how little progress it's made since then. I've...
39
by: Darren Oakey | last post by:
Hi all, I just thought I'd throw down what I think are the three biggest language inadequacies of C#, hopefully so that people will jump on the bandwagon and lobby MS to fix them! So - in order:...
2
by: Erich Brunthaller | last post by:
I run the SQL-server on VM-Ware with mixed mode auth. When I host the ASP service on IIS in VM-Ware access is possible from everywhere. But hosting the service on the IIS outside VM-Ware can not...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
87
by: pereges | last post by:
I have a C program which I created on Windows machine. I have compiled and executed the program on windows machine and it gives me the consistent output every time i run it. for eg. input a = 2,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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 projectplanning, coding, testing,...

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.