PC Review


Reply
Thread Tools Rate Thread

Different Language causing bugs

 
 
Atara
Guest
Posts: n/a
 
      11th Jul 2004

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!
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      11th Jul 2004
* Atara <(E-Mail Removed)> 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/>
 
Reply With Quote
 
Atara
Guest
Posts: n/a
 
      11th Jul 2004

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!
 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      11th Jul 2004
* Atara <(E-Mail Removed)> 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/>
 
Reply With Quote
 
Atara
Guest
Posts: n/a
 
      12th Jul 2004


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!
 
Reply With Quote
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      12th Jul 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> 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!



 
Reply With Quote
 
Atara
Guest
Posts: n/a
 
      13th Jul 2004

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!
 
Reply With Quote
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      13th Jul 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu has bugs.... Lots of bugs more than 50,000+ documented measekite Da Monkey Windows Vista General Discussion 7 29th Apr 2009 08:15 AM
Vista pro - bugs... bugs... bugs... =?Utf-8?B?S2FtaWwgRHVyc3Vu?= Windows Vista Performance 3 22nd May 2007 07:10 AM
Compatibility options causing bugs =?Utf-8?B?QmlnIERhdmUgVUs=?= Microsoft Word Document Management 0 18th Oct 2005 12:28 PM
Setting language to Japanse for non-unicode program causing dialog resize Joe Windows XP Help 0 5th Aug 2004 04:46 PM
language bar causing locked taskbar changes? Paul Windows XP General 0 6th Sep 2003 05:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:00 PM.