Bug: It isn't the Size of The File... it's a Special Chars Bug....!

Hi!
I while ago, before buying my Reshaper License,I was evaluating
Reshaper, and I wasn't sure about buying it, because I found a bug so I
wrote to support@jetbrains.com:

"I should be able to choose if only one the refactoring
functionality and not the "Resharp Intellisense", I
think this is very important because the refactoring
functionality works very fast and is very stable, but
the "Resharp Intellisense"... well... it has problems
dealing with some really big autogenerated .CS (7000
LOC in 70 Classes).

The funny thing is that if I open this big .CS,
suddenly ReSharp recognizes all the classes in
there... but if I close it again... it forgets all
that it learned, and says those classes do not exist,
so I have to keep open this big file while I work with
other files to keep using ReSharp.

Therfore, I really enjoyed the refactoring, but, since
Intellisense keep believing that some of my classes
"do not exist", I had to uninstall ReSharp. (If I
could only just "shut down" the Intellisense)"

That time Valentin Kipiatkov (I think it was him :$ ) told me how to
disable Intellisense, therefore, a few months later, even without
Intellisense I bought my ReshaperLicense.. ;)
And I told him that I was going to investigate the bug, to see what was
exactly the problem with my "big autogenerated .CS file".

But... then... I got too much work and couldn't do the investigation...
until now... :-).

It turns out.. that the problem is not the big size of the file, the
problem, is that I have a class inside that class, that has a property
with name:

"FacturaciónSuspendidas"

the problem here... it seems... its the "ó" (or more precisely the
accent "´")

Now... I know I shouldn't be using "´" or "ñ", but, since C# and VS.NET
accept them... and reshaper recognizes them when I open the "Big .CS
file", but "fails" when I close it... I believe the problem should be
with the character encoding... Am I right? Do you think it could be
fixed in the next minor release? :)

Thanks and keep the great work :)













0
17 comments

Hi!

I tried it and reproduced the bug. I created a class and added a property
with "FacturacionSuspendidas" name. I created another class (in another file)
and used this property from it. So far everything fine. After closing the
first file, the usage of the property got highlighted as unresolved. After
some investigation I found the reason of the problem. When saving file to
the disk VS dropped the accent in 'o' and replaced this character with simple
'o'. So after openning it for the second time the property name has changed.
So it's correct that ReSharper did not resolve it anymore. Do you have the
same behavior?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi!
I while ago, before buying my Reshaper License,I was evaluating
Reshaper, and I wasn't sure about buying it, because I found a bug so
I
wrote to support@jetbrains.com:
"I should be able to choose if only one the refactoring functionality
and not the "Resharp Intellisense", I think this is very important
because the refactoring functionality works very fast and is very
stable, but the "Resharp Intellisense"... well... it has problems
dealing with some really big autogenerated .CS (7000 LOC in 70
Classes).

The funny thing is that if I open this big .CS, suddenly ReSharp
recognizes all the classes in there... but if I close it again... it
forgets all that it learned, and says those classes do not exist, so I
have to keep open this big file while I work with other files to keep
using ReSharp.

Therfore, I really enjoyed the refactoring, but, since Intellisense
keep believing that some of my classes "do not exist", I had to
uninstall ReSharp. (If I could only just "shut down" the
Intellisense)"

That time Valentin Kipiatkov (I think it was him :$ ) told me how to
disable Intellisense, therefore, a few months later, even without
Intellisense I bought my ReshaperLicense.. ;)
And I told him that I was going to investigate the bug, to see what
was
exactly the problem with my "big autogenerated .CS file".
But... then... I got too much work and couldn't do the
investigation... until now... :-).

It turns out.. that the problem is not the big size of the file, the
problem, is that I have a class inside that class, that has a property
with name:

"FacturacionSuspendidas"

the problem here... it seems... its the "o" (or more precisely the
accent "?")

Now... I know I shouldn't be using "?" or "n", but, since C# and
VS.NET accept them... and reshaper recognizes them when I open the
"Big .CS file", but "fails" when I close it... I believe the problem
should be with the character encoding... Am I right? Do you think it
could be fixed in the next minor release? :)

Thanks and keep the great work :)




0

Hi!
Well, in my case, VS.NET 2003 does not drop the accent in the "o", (or
the..."tilde" in the ñ)... (AFAIK VS.NET and the C# compiler support
international chars... so accents and ñ are perfectly valid)

I have worked with this characters for months... (as a matter of fact, I
didn't even realize they were a problem until yesterday, when I made a
copy of my proyect and started deleting code until the syntax
highlighting of Reshaper started to work )
Maybe something in you software configuration removes "strange characters" ?

(A funny thing is than in you reply, the "copy" of what I wrote,
automagically "removed" the accents, and transformed the "ñ" to "n" and
"´" to "?"... maybe your newsreader also removes special characters?).

Mmmm. while trying to send this email, my newreader now it told me that
it had "strange" characters, and that it was unsafe to send Unicode
emails... and FireBird says that the encoding for this is
"Cyrillic(KOI-8R)", while the message I sent yesterday was: Western "ISO
88591"....

Well, I'll answer FireBird "yes" to the question, to that this mail is
sent as UTF8... I wonder what characters you will see.... :S


Thanks
bye
Luxspes

Valentin Kipiatkov (JetBrains) wrote:

Hi!

I tried it and reproduced the bug. I created a class and added a
property with "FacturacionSuspendidas" name. I created another class (in
another file) and used this property from it. So far everything fine.
After closing the first file, the usage of the property got highlighted
as unresolved. After some investigation I found the reason of the
problem. When saving file to the disk VS dropped the accent in 'o' and
replaced this character with simple 'o'. So after openning it for the
second time the property name has changed. So it's correct that
ReSharper did not resolve it anymore. Do you have the same behavior?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Maybe Cyrillic(KOI-8R) kills ñ and "´"?
Maybe if you configure your computer as if you spoke spanish your VS.NET
will not delete those characters... (or maybe you need another language
of VS.NET installed?)
This is a really strange problem... :$

0

Do you do anything special to specify encoding for your files?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi!
Well, in my case, VS.NET 2003 does not drop the accent in the "o", (or
the..."tilde" in the n)... (AFAIK VS.NET and the C# compiler support
international chars... so accents and n are perfectly valid)
I have worked with this characters for months... (as a matter of fact,
I
didn't even realize they were a problem until yesterday, when I made a
copy of my proyect and started deleting code until the syntax
highlighting of Reshaper started to work )
Maybe something in you software configuration removes "strange
characters" ?
(A funny thing is than in you reply, the "copy" of what I wrote,
automagically "removed" the accents, and transformed the "n" to "n"
and "?" to "?"... maybe your newsreader also removes special
characters?).

Mmmm. while trying to send this email, my newreader now it told me
that it had "strange" characters, and that it was unsafe to send
Unicode emails... and FireBird says that the encoding for this is
"Cyrillic(KOI-8R)", while the message I sent yesterday was: Western
"ISO 88591"....

Well, I'll answer FireBird "yes" to the question, to that this mail is
sent as UTF8... I wonder what characters you will see.... :S

Thanks
bye
Luxspes
Valentin Kipiatkov (JetBrains) wrote:

>> Hi!
>>
>> I tried it and reproduced the bug. I created a class and added a
>> property with "FacturacionSuspendidas" name. I created another class
>> (in another file) and used this property from it. So far everything
>> fine. After closing the first file, the usage of the property got
>> highlighted as unresolved. After some investigation I found the
>> reason of the problem. When saving file to the disk VS dropped the
>> accent in 'o' and replaced this character with simple 'o'. So after
>> openning it for the second time the property name has changed. So
>> it's correct that ReSharper did not resolve it anymore. Do you have
>> the same behavior?
>>
>> Valentin Kipiatkov
>> Chief Scientist, Vice President of Product Development
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"



0
Avatar
Francisco Peredo

No. Absolutely nothing. I have worked in many projects using accents, and "ñ" (since I work in Mexico, and we speak spanish here ;) )
Maybe if you change your "regional configuration" to make your computer think you are in Spain or in Mexico the special chars will be preserved... or maybe it is because the MSDN DVD for visual studio I use at work had written "English (International)" (yes, I prefer to install some things in english because it is easier to find error messages in google that way ;) )

AFAIK Czech (or Russian) language has special chars... :$ Do you use them when you develop? Maybe you could use a similar method to handle Spanish chars? ;)

Since the problem "appears" when the file with the special characters is closed, and vanishes when it get closed... maybe the error is that Reshaper is not opening the System.IO.StreamReader with the right encoding... maybe the core assumes that Encoding.ASCII is beig used... maybe it should ask VS.NET what encoding it shoud use... or maybe it should use Encoding.Default... I really don't know much about encodings :'( ...

For now, I have removed all strange chars, but it would be nice to be able to write "Año" (year in spanish) again, instead of "Anio" (because Año with N instead of Ñ is a word considered somewhat obscene around here ;) )

Of course... I prefer to work without Ñ than work without Reshaper ;)

0

Hello Luxspes,

you're absolutely right - the problem is caused by that ReSharper uses StreamReader
with the default encoding
(Encoding.Default), and in your case that encoding seems to differ from the
actual one. We'll investigate ways
to fix this issue.

Thank you for your report!

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

No. Absolutely nothing. I have worked in many projects using accents,
and "?" (since I work in Mexico, and we speak spanish here ;) )Maybe
if you change your "regional configuration" to make your computer
think you are in Spain or in Mexico the special chars will be
preserved... or maybe it is because the MSDN DVD for visual studio I
use at work had written "English (International)" (yes, I prefer to
install some things in english because it is easier to find error
messages in google that way ;) )AFAIK Czech (or Russian) language
has special chars... :$ Do you use them when you develop? Maybe you
could use a similar method to handle Spanish chars? ;)Since the
problem "appears" when the file with the special characters is closed,
and vanishes when it get closed... maybe the error is that Reshaper is
not opening the System.IO.StreamReader with the right encoding...
maybe the core assumes that Encoding.ASCII is beig used... maybe it
should ask VS.NET what encoding it shoud use... or maybe it should use
Encoding.Default.. I really don't know much about encodings :'( ...
For now, I have removed all strange chars, but it would be nice to be
able to write "A?o" (year in spanish) again, instead of "Anio"
(because A?o with N instead of ? is a word considered somewhat obscene
around here ;) )Of course... I prefer to work without ? than work
without Reshaper ;)




0

I have the same problem with Czech chars in the source code. I always lose the special chars (?š??žýáíé) when using ReSharper. The Visual Studio 2003 without reSharper works fine.

I think, that this bugs goes to ReSharper and in my opinion the priority should be very high becouse untill this will be solved I am not able tu use it for Czech win form application.

Is there any solution untill the Resharper will solved it ?

0

Hello David,

If the number of the files is not too big as a temporary workaround you may
keep all files containing Czech identifiers open in VS. In that case ReSharper
will read the files from the VS editor rather than the file system, and local
characters will be treated correctly.

I have the same problem with Czech chars in the source code. I always
lose the special chars (?????????) when using ReSharper. The Visual
Studio 2003 without reSharper works fine.I think, that this bugs
goes to ReSharper and in my opinion the priority should be very high
becouse untill this will be solved I am not able tu use it for Czech
win form application.Is there any solution untill the Resharper will
solved it ?




0

Hello David,

another workaround I see in separating localized resources from code which
is anyway considered
a good practice.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I have the same problem with Czech chars in the source code. I always
lose the special chars (?????????) when using ReSharper. The Visual
Studio 2003 without reSharper works fine.I think, that this bugs
goes to ReSharper and in my opinion the priority should be very high
becouse untill this will be solved I am not able tu use it for Czech
win form application.Is there any solution untill the Resharper will
solved it ?




0

Well, I've realized that my comment was a bit off topic...sorry for this :)


Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello David,

another workaround I see in separating localized resources from code
which
is anyway considered
a good practice.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>> I have the same problem with Czech chars in the source code. I always
>> lose the special chars (?????????) when using ReSharper. The Visual
>> Studio 2003 without reSharper works fine.I think, that this bugs
>> goes to ReSharper and in my opinion the priority should be very high
>> becouse untill this will be solved I am not able tu use it for Czech
>> win form application.Is there any solution untill the Resharper
>> will solved it ?
>>



0

For those users who experience similar problems could you please describe:

1) What are the regional settings on your machine (tab Languages->Details->Default
Input Language)?

2) What version of VS.NET you're using?

3) Do you something special in VS when you saving files (like chosing File
-> Save As and setting encoding explicitly)?

4) It would be also nice for us to know what property Encoding.Default returns
on your machine.

Thanks.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi!
I while ago, before buying my Reshaper License,I was evaluating
Reshaper, and I wasn't sure about buying it, because I found a bug so
I
wrote to support@jetbrains.com:
"I should be able to choose if only one the refactoring functionality
and not the "Resharp Intellisense", I think this is very important
because the refactoring functionality works very fast and is very
stable, but the "Resharp Intellisense"... well... it has problems
dealing with some really big autogenerated .CS (7000 LOC in 70
Classes).

The funny thing is that if I open this big .CS, suddenly ReSharp
recognizes all the classes in there... but if I close it again... it
forgets all that it learned, and says those classes do not exist, so I
have to keep open this big file while I work with other files to keep
using ReSharp.

Therfore, I really enjoyed the refactoring, but, since Intellisense
keep believing that some of my classes "do not exist", I had to
uninstall ReSharp. (If I could only just "shut down" the
Intellisense)"

That time Valentin Kipiatkov (I think it was him :$ ) told me how to
disable Intellisense, therefore, a few months later, even without
Intellisense I bought my ReshaperLicense.. ;)
And I told him that I was going to investigate the bug, to see what
was
exactly the problem with my "big autogenerated .CS file".
But... then... I got too much work and couldn't do the
investigation... until now... :-).

It turns out.. that the problem is not the big size of the file, the
problem, is that I have a class inside that class, that has a property
with name:

"FacturaciónSuspendidas"

the problem here... it seems... its the "ó" (or more precisely the
accent "´")

Now... I know I shouldn't be using "´" or "ñ", but, since C# and
VS.NET accept them... and reshaper recognizes them when I open the
"Big .CS file", but "fails" when I close it... I believe the problem
should be with the character encoding... Am I right? Do you think it
could be fixed in the next minor release? :)

Thanks and keep the great work :)




0

Hi,
I have perhaps similar problem. When I close any source file in VS, then I cannot open it, or any other file, any more, the source window is frozen, although object browser and other windows from VS except source are OK.
Only restart of VS helps.
I'm using VS 2003 German
Win2K German
Encoding.Default.Codepage=1252

I have tried to remove all non-standard characters that IDE generated, but it didn't help (only comments).
I hoped that version 1.6 helps, but it is the same bahaviour as in 1.5.
Everyhing else works well - until a file is closed...
How can I disable Intellisense mention above? If it helps I can give a try if I can live without it. Because having too many files opened in IDE is quite annoying...
Or can you give me a hint or workaround? I love Reshaper, it would be a pity to throw it away because of such a anoying bug.

0

The problem could be this:

I have Microsoft Windows Professional EN version. But I write my source code with Czech characters.

And the answer:
1. English as default (other Czech)

2. Microsoft Visual Studio 2003 Profesional

3. Save all, ctrl + s

Dave

0

Any news on this? Since I'm still loosing german characters (äöü...etc.)
in source files, I believe this bug is already there...

1) German

2) VS.NET 2003 (7.1.3088) english

3) nothing special, ctrl+s

4) Western European (Windows) CodePage 1252

Regards,
Uwe

For those users who experience similar problems could you please
describe:

1) What are the regional settings on your machine (tab
Languages->Details->Default Input Language)?

2) What version of VS.NET you're using?

3) Do you something special in VS when you saving files (like chosing
File -> Save As and setting encoding explicitly)?

4) It would be also nice for us to know what property Encoding.Default
returns on your machine.

Thanks.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"



0

Hello Uwe,

we haven't fixed this problem in ReSharper 1.5. In the upcoming ReSharper 2.0
we'll definitely fix it. As for putting the fix into the currently released
1.5 version,
we'll consider that.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Any news on this? Since I'm still loosing german characters
(äöü...etc.) in source files, I believe this bug is already there...

1) German

2) VS.NET 2003 (7.1.3088) english

3) nothing special, ctrl+s

4) Western European (Windows) CodePage 1252

Regards,
Uwe

>> For those users who experience similar problems could you please
>> describe:
>>
>> 1) What are the regional settings on your machine (tab
>> Languages->Details->Default Input Language)?
>>
>> 2) What version of VS.NET you're using?
>>
>> 3) Do you something special in VS when you saving files (like chosing
>> File -> Save As and setting encoding explicitly)?
>>
>> 4) It would be also nice for us to know what property
>> Encoding.Default returns on your machine.
>>
>> Thanks.
>>
>> Regards,
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"


0

maybe O.T.:

I experienced something like this (well, files only being compiled/used when open), but this was because the file wasn't included in the VS project. If you keep it open, it compiles correctly with the opened, if you close it, it will use the old assembly version referenced in the project.

0

Hello Dmitry,

I'm still suffering from loosing german characters in source files.

May I ask for fixing this issue in ReSharper 1.5? It's really annoying...

Regards,
Uwe

Hello Uwe,

we haven't fixed this problem in ReSharper 1.5. In the upcoming
ReSharper 2.0
we'll definitely fix it. As for putting the fix into the currently
released
1.5 version,
we'll consider that.
Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>> Any news on this? Since I'm still loosing german characters
>> (äöü...etc.) in source files, I believe this bug is already there...
>>
>> 1) German
>>
>> 2) VS.NET 2003 (7.1.3088) english
>>
>> 3) nothing special, ctrl+s
>>
>> 4) Western European (Windows) CodePage 1252
>>
>> Regards,
>> Uwe
>>> For those users who experience similar problems could you please
>>> describe:
>>>
>>> 1) What are the regional settings on your machine (tab
>>> Languages->Details->Default Input Language)?
>>>
>>> 2) What version of VS.NET you're using?
>>>
>>> 3) Do you something special in VS when you saving files (like
>>> chosing File -> Save As and setting encoding explicitly)?
>>>
>>> 4) It would be also nice for us to know what property
>>> Encoding.Default returns on your machine.
>>>
>>> Thanks.
>>>
>>> Regards,
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"


0

Please sign in to leave a comment.