473,405 Members | 2,210 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,405 software developers and data experts.

Char... Unicode version (bug?): what about 2.0?

Dan
Hi all, I'd like to submit what it seems to be a bug as for the Unicode
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C). For these codes I get the following
results:

+03F2: lowercase c:
Char.IsLetter() = true (OK)
Char.IsUpper() = false (OK)
Char.IsLower() = true (OK)
Char.ToUpper('\x3f2') and .ToLower both = +03F2 (! I'd expect +03F9 for
ToUpper)

+03F9: uppercase C:
Char.IsLetter() = false (!)
Char.IsUpper() = false (!)
Char.IsLower() = false (OK)
Char.ToUpper('\x3f9') and .ToLower both = +03F9 (! I'd expect +03F2 for
ToLower)

It appears that +03F9 is not treated as a 'letter' as it happens for +03F2,
which seems deprived of its capital form. I'd like to know if this is an
issue coming from an older Unicode version or it's just a bug or by some
design choice I can't catch, and if anyone using the .NET 2 Beta can tell me
how .NET 2.0 behaves about this.
If you 2.0 guys are as lazy as me, try the following code fragment to have a
test (just paste it into a console app):

static private void DumpSingleChar(char c)
{
Console.WriteLine("IsLetter = {0}", Char.IsLetter(c));
Console.WriteLine("IsUpper = {0}", Char.IsUpper(c));
Console.WriteLine("IsLower = {0}", Char.IsLower(c));
Console.WriteLine("ToUpper = {0:X4}", (int)Char.ToUpper(c));
Console.WriteLine("ToLower = {0:X4}", (int)Char.ToLower(c));
}

[STAThread]
static void Main(string[] args)
{
Console.WriteLine("+03F2");
DumpSingleChar('\x3F2');

Console.WriteLine("+03F9");
DumpSingleChar('\x3F9');
}

Thanx!
Nov 17 '05 #1
10 1889
Hi Dan,

I'm afraid the capital lunate sigma is not supported in the unicode version used by .NET Framework 1.1 and perhaps even 2.0. As far as I can tell Unicode version 3.1 is used by .NET Framework 1.1, and the behaviour is the same in 2.0.

http://www.tlg.uci.edu/help/UnicodeTest.html
--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #2
Hi Dan,

I'm afraid the capital lunate sigma is not supported in the unicode version used by .NET Framework 1.1 and perhaps even 2.0. As far as I can tell Unicode version 3.1 is used by .NET Framework 1.1, and the behaviour is the same in 2.0.

http://www.tlg.uci.edu/help/UnicodeTest.html
--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #3
On Tue, 23 Aug 2005 18:01:58 +0200, "Dan" <fu**********@tiscali.it>
wrote:
Hi all, I'd like to submit what it seems to be a bug as for the Unicode
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C).


If this is a reproducible bug you should definitely submit it to the
MSDN Product Feedback Center:
http://lab.msdn.microsoft.com/productfeedback/

I don't think any new bugs will get fixed for VS 2005 but Microsoft
might fix it in a service pack or a later version.
--
http://www.kynosarges.de
Nov 17 '05 #4
On Tue, 23 Aug 2005 18:01:58 +0200, "Dan" <fu**********@tiscali.it>
wrote:
Hi all, I'd like to submit what it seems to be a bug as for the Unicode
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C).


If this is a reproducible bug you should definitely submit it to the
MSDN Product Feedback Center:
http://lab.msdn.microsoft.com/productfeedback/

I don't think any new bugs will get fixed for VS 2005 but Microsoft
might fix it in a service pack or a later version.
--
http://www.kynosarges.de
Nov 17 '05 #5
Dan
Thank you both! I'll have to stick to another (custom) solution for my
projects, but it is a good idea to submit this issue to MS, I'll do it as
soon as I've verified that the behaviour is the same in VS2005 (I must get
the Beta and install it in a non-production machine first... in the
meanwhile, if anyone gives a try to the code I posted earlier in .NET 2.0
please drop me a line about its behaviour...)

Happy coding to all!
Nov 17 '05 #6
Dan
Thank you both! I'll have to stick to another (custom) solution for my
projects, but it is a good idea to submit this issue to MS, I'll do it as
soon as I've verified that the behaviour is the same in VS2005 (I must get
the Beta and install it in a non-production machine first... in the
meanwhile, if anyone gives a try to the code I posted earlier in .NET 2.0
please drop me a line about its behaviour...)

Happy coding to all!
Nov 17 '05 #7
I don't think it's a bug, .NET v2.0 is Unicode 3.1 based and U+03F9 is a
4.0.0 codepoint.
Anyway, like Christoph said, you can always file an issue to
http://lab.msdn.microsoft.com/productfeedback/

Willy.
"Dan" <fu**********@tiscali.it> wrote in message
news:43*********************@news.tiscali.it...
Hi all, I'd like to submit what it seems to be a bug as for the Unicode
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C). For these codes I get the following
results:

+03F2: lowercase c:
Char.IsLetter() = true (OK)
Char.IsUpper() = false (OK)
Char.IsLower() = true (OK)
Char.ToUpper('\x3f2') and .ToLower both = +03F2 (! I'd expect +03F9 for
ToUpper)

+03F9: uppercase C:
Char.IsLetter() = false (!)
Char.IsUpper() = false (!)
Char.IsLower() = false (OK)
Char.ToUpper('\x3f9') and .ToLower both = +03F9 (! I'd expect +03F2 for
ToLower)

It appears that +03F9 is not treated as a 'letter' as it happens for
+03F2, which seems deprived of its capital form. I'd like to know if this
is an issue coming from an older Unicode version or it's just a bug or by
some design choice I can't catch, and if anyone using the .NET 2 Beta can
tell me how .NET 2.0 behaves about this.
If you 2.0 guys are as lazy as me, try the following code fragment to have
a test (just paste it into a console app):

static private void DumpSingleChar(char c)
{
Console.WriteLine("IsLetter = {0}", Char.IsLetter(c));
Console.WriteLine("IsUpper = {0}", Char.IsUpper(c));
Console.WriteLine("IsLower = {0}", Char.IsLower(c));
Console.WriteLine("ToUpper = {0:X4}", (int)Char.ToUpper(c));
Console.WriteLine("ToLower = {0:X4}", (int)Char.ToLower(c));
}

[STAThread]
static void Main(string[] args)
{
Console.WriteLine("+03F2");
DumpSingleChar('\x3F2');

Console.WriteLine("+03F9");
DumpSingleChar('\x3F9');
}

Thanx!

Nov 17 '05 #8
I don't think it's a bug, .NET v2.0 is Unicode 3.1 based and U+03F9 is a
4.0.0 codepoint.
Anyway, like Christoph said, you can always file an issue to
http://lab.msdn.microsoft.com/productfeedback/

Willy.
"Dan" <fu**********@tiscali.it> wrote in message
news:43*********************@news.tiscali.it...
Hi all, I'd like to submit what it seems to be a bug as for the Unicode
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C). For these codes I get the following
results:

+03F2: lowercase c:
Char.IsLetter() = true (OK)
Char.IsUpper() = false (OK)
Char.IsLower() = true (OK)
Char.ToUpper('\x3f2') and .ToLower both = +03F2 (! I'd expect +03F9 for
ToUpper)

+03F9: uppercase C:
Char.IsLetter() = false (!)
Char.IsUpper() = false (!)
Char.IsLower() = false (OK)
Char.ToUpper('\x3f9') and .ToLower both = +03F9 (! I'd expect +03F2 for
ToLower)

It appears that +03F9 is not treated as a 'letter' as it happens for
+03F2, which seems deprived of its capital form. I'd like to know if this
is an issue coming from an older Unicode version or it's just a bug or by
some design choice I can't catch, and if anyone using the .NET 2 Beta can
tell me how .NET 2.0 behaves about this.
If you 2.0 guys are as lazy as me, try the following code fragment to have
a test (just paste it into a console app):

static private void DumpSingleChar(char c)
{
Console.WriteLine("IsLetter = {0}", Char.IsLetter(c));
Console.WriteLine("IsUpper = {0}", Char.IsUpper(c));
Console.WriteLine("IsLower = {0}", Char.IsLower(c));
Console.WriteLine("ToUpper = {0:X4}", (int)Char.ToUpper(c));
Console.WriteLine("ToLower = {0:X4}", (int)Char.ToLower(c));
}

[STAThread]
static void Main(string[] args)
{
Console.WriteLine("+03F2");
DumpSingleChar('\x3F2');

Console.WriteLine("+03F9");
DumpSingleChar('\x3F9');
}

Thanx!

Nov 17 '05 #9

"Dan" <fu**********@tiscali.it> wrote in message
news:43*********************@news.tiscali.it...
Thank you both! I'll have to stick to another (custom) solution for my
projects, but it is a good idea to submit this issue to MS, I'll do it as
soon as I've verified that the behaviour is the same in VS2005 (I must get
the Beta and install it in a non-production machine first... in the
meanwhile, if anyone gives a try to the code I posted earlier in .NET 2.0
please drop me a line about its behaviour...)

Happy coding to all!


Dan,

The v2.0 behaves just like v1.x.
+03F2
IsLetter = True
IsUpper = False
IsLower = True
ToUpper = 03F2
ToLower = 03F2

+03F9
IsLetter = False
IsUpper = False
IsLower = False
ToUpper = 03F9
ToLower = 03F9
Willy.
Nov 17 '05 #10

"Dan" <fu**********@tiscali.it> wrote in message
news:43*********************@news.tiscali.it...
Thank you both! I'll have to stick to another (custom) solution for my
projects, but it is a good idea to submit this issue to MS, I'll do it as
soon as I've verified that the behaviour is the same in VS2005 (I must get
the Beta and install it in a non-production machine first... in the
meanwhile, if anyone gives a try to the code I posted earlier in .NET 2.0
please drop me a line about its behaviour...)

Happy coding to all!


Dan,

The v2.0 behaves just like v1.x.
+03F2
IsLetter = True
IsUpper = False
IsLower = True
ToUpper = 03F2
ToLower = 03F2

+03F9
IsLetter = False
IsUpper = False
IsLower = False
ToUpper = 03F9
ToLower = 03F9
Willy.
Nov 17 '05 #11

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

Similar topics

1
by: Fahd Khan | last post by:
Hi team! While troubleshooting a crash I had while using BitTorrent where the torrent's target file names didn't fall into the ascii range I was playing around in the interpreter and noticed this...
6
by: Mike Brown | last post by:
This works as expected (this is on an ASCII terminal): >>> unicode('asdf\xff', errors='replace') u'asdf\ufffd' This does not work as I expect it to: >>> class C: .... def __str__(self):
2
by: Neil Schemenauer | last post by:
python-dev@python.org.] The PEP has been rewritten based on a suggestion by Guido to change str() rather than adding a new built-in function. Based on my testing, I believe the idea is...
12
by: Onega | last post by:
Hi I create a simple win32 project (VC2003, windows2003(English) , and do simple paint in WM_PAINT message, when the project use multi-character set, it is OK. but when I change to UNICODE,...
16
by: halukg | last post by:
I am trying to send a 6 byte char array from the serial port in new C# 2005 Express: com.Write(new string(new char { (char)34, (char)14, (char)192, (char)51, (char)0, (char)0 }, 0, 6)); I am...
0
by: Dan | last post by:
Hi all, I'd like to submit what it seems to be a bug as for the Unicode compliance of methods like Char.Is...: as stated by the latest version of Unicode, codes +03F2 and +03F9 represent Greek...
5
by: Joe Thompson | last post by:
Hi, I am using VS.net 2003 to write a managed C++ windows application. My main form traps the WM_DEVICECHANGE message and calls a method in my own unmanaged class passing the wParam and lParam....
6
by: NormD | last post by:
I'm sending a string (xml string) to web service as a parameter. One of the tags in the xml string is the address field and the values of this tag have LF + CR chars. When I receive the string in...
10
by: Erik Knudsen | last post by:
Hi! In converting applications from ansi to unicode, it is a problem that the std::wcout accepts a const char * without complaining compile time. This compiles and runs:...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.