I think I found a bug of .NET Framework, how to report?

  • Thread starter Thread starter FrzzMan
  • Start date Start date
Well, here is another nice question:

How do you know you:
* Have a bug, not your own bad code. 99% of tehe so called bugs are NOT
bugs.
* It is not already known?

Otherwise you can post it here (and someone will pick it up and report it)
or go through PSS:

--
Regards

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
(CTO PowerNodes Ltd.)
 
FrzzMan:

If you are sure that you really found a bug, posting it here will get it
noticed. Moreoever, each product has a product home page and I believe they
all have a "Submit a bug" link on them....
http://msdn.microsoft.com/vfoxpro/support/default.aspx is Foxpro's for
instance.

However, if you browse the various NG's , you'll see quite a few bugs being
reported. The overwhelming majority are either developer errors or the code
is doing what it's supposed to but the devloper is expeciting different
results. Posting bugs is very useful, but if you make such an announcement,
please make sure you've thoroughly tested it and are quite sure it's a bug,
making sure you read the documentation on it first. I know this sounds
obvious, but there are a LOT of bug reports that are actually built in
features or functionality explained fully in the documentation - or they are
bugs on the users part.

HTH,

Bill
 
FrzzMan said:
This is the code that expose the "bug" (I think)

string Data = "UTF-8 string"; // <-- Insert some *long* UTF-8 string
byte[] DataBytes = System.Text.Encoding.UTF8.GetBytes(Data);
string BackConvert = System.Text.Encoding.UTF8.GetString(DataBytes);

System.Console.WriteLine(Data == BackConvert);

System.IO.StreamWriter File = System.IO.File.CreateText("test.txt");
File.Write(Data + "\n" + BackConvert);
File.Close();


1. You did NOT write the "text.txt" file with this sample of code!
Because in your sample you use "\n" and test.txt contains "\n\r".

2. If I use your first string and do the same conversion to and from
bytes, then I have the same string.

3. Please provide a FULL working example!

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp


Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/
 
Hi FrzzMan,

I tried your code and it produced the same exact string. Visual Studio
did however warn about this string containing Unicode characters that
might not be saved properly in the source file. Btw, I am using Windows
XP English version, Local settings set to Norwegian Bokmål, Visual Studio
..Net 2003

Happy coding!
Morten Wennevik [C# MVP]
 
There's not much here, my question is the subject...

You should not do this - "my question is the subject..."
Andreas Håkansson and n! will kill you for such posting.
See my post on 16/04.
Of course there is always possibility that n! and AH reaction to my post was
personal.

MH
 
I used your code and for me it always returns "true"

But let me suggest your one thing:

- never put not ascii-chars into source files!!! (better load it from some
resource-files)
- if you need to do this, then save as UNICODE!

Then it works.
If you save your source-files as plain ascii, it will not work.

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp


Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/
 
Still, I get the same result and "true".
I cannot however test the last string as I don't have the LZO stuff, but
considering this is basically the same as the second one (being compressed
and then decompressed) I would expect the same result.

Happy coding!
Morten Wennevik [C# MVP]
 
There's not much here, my question is the subject...
You should not do this - "my question is the subject..."
Andreas Håkansson and n! will kill you for such posting.
See my post on 16/04.
Of course there is always possibility that n! and AH reaction to my post was
personal.

lol :)

I do not want to keep going over this, but I also don't want you thinking I
tried to make any attack on you (and Andreas didn't either). The problem
wasn't you or the 'read the subject' line content alone. But the fact that
your subject didn't convey enough information to provide a useful answer
without guessing what you wanted. FWIW I was actually trying to help you....

n!
 
:)

It's ok, I didn't think that you want to attack me, in fact at that moment I don't know what to say, but in my case, at least my subject provice
enough information :D

Thanks anyway...
 
Thank you and Morten Wennevik, I think it is a bug because I did try my
code on 4 machine in total. They all give me the "False", hmmm... btw if
you are all got "True" then I think I have to re-check my code (altho I
checked it hundreds times)...

About your post, Jochen...
- never put not ascii-chars into source files!!! (better load it from some
resource-files)

Can you show me how to do this? In fact, I have an XML file that I want
to hardcode to the app, but I have to manually build a string to produce
the XML content (escape every special strings... etc...), I've just
switched to C#, I have much exp with PHP tho :D
- if you need to do this, then save as UNICODE!
I did save my source as UTF-8 :(
 
FrzzMan said:
Can you show me how to do this? In fact, I have an XML file that I
want to hardcode to the app, but I have to manually build a string to
produce the XML content (escape every special strings... etc...), I've
just switched to C#, I have much exp with PHP tho :D

"Project | Add New Item... | Assembly Resource File"
Add this file with the apropriate name,
tehn your System.Resources.ResourceManager to read the string from the
recourse.


--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top