473,324 Members | 2,166 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,324 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 1884
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.