When you use uppercase characters from a different language
in a file name in Visual C# .NET, you may receive multiple errors. When you
rename a file to include characters from a different language, and you open
these files in an editor, you receive the following warning message when you
compile the file:
Source file
'filename' specified multiple times
Also, you may find that you cannot navigate, outline, add color, use the code model, use Microsoft IntelliSense, or load the designer. The following problems also occur:
The source file loses color.
The debugger prompts the user to open the file before each
breakpoint, and after each time the user steps, even if the file is already
open.
Breakpoints are not displayed while debugging, but are
hit.
To work around problems such as the loss of colorization,
navigation, code model, or Intellisense, close the file in the editor, and then
reopen the file. When you do this, all services are restored.
To work
around debugging problems, change the file name after you close the file in the
editor.
Navigation Features That Do Not Function Correctly When You Double-Click the Error in the Task
List
Set System locale to Turkish. To do this in Microsoft Windows
XP, follow these steps:
In Control Panel, click Date,
Time, Language, and Regional Options, and then click Regional
and Language Options.
In the Regional and Language Options dialog box,
click the Advanced tab.
Under Language for non-Unicode
programs, select Turkish from the
list.
To do this in Microsoft Windows 2000 Advanced Server, follow
these steps:
In Control Panel, double-click
Regional Options.
On the General tab, select
Turkish from the your locale (location):
list. If you cannot find Turkish, click to select the
Turkic check box under Language settings for the
system. Restart your computer when you are prompted to do
so.
In the Regional Options dialog box,
click the Input locales tab, and then click
Change.
Under Installed Services, click
Add. In the Add Input Language dialog box,
select Turkish from the Input Language list.
Click OK.
In the notification area of
taskbar, click the Language icon, and then select
Turkish.
Start Microsoft Visual Studio .NET.
On the File menu, point to New,
and then click Project.
Click Visual
C# Projects under Project Types, click Console
Application under Templates, and then click OK.
In the "Main" section of the default code, add the following code:
int iVal1 = 10;
int iVal2 = 20;
int iSum = 0;
string str = "\u0049\u0131\u0130\u0069";
iSum = iVal1 + iVal2;
Console.WriteLine("the sum is {0} string = {1}", iSum, str);
Build the project.
Insert breakpoints.
Press F5 to start debugging.
Press SHIFT+F5 to stop debugging.
Change the name of the Class1.cs file to
İ1.cs.
Introduce a build error (remove line terminator ";" in the
source code İ.cs).
Build the application. You receive the build
error.
Double-click the build error in the Task
List.
You receive the following error message:
"The operation could not be completed"
The problem occurs
because the file name is put in the Task List. The correct string
should be "İ1". The string that is put in the Task List is
"i1", which does not have a matching file name.
You also experience the
following problems:
All language services stop working or do not work
correctly.
Outlining, colorization, code model, Intellisense, and loading
designer do not work.
The editor does not show the breakpoints that are set in
the code.
Debugger Problems
Debugger features do not work correctly.
Follow the earlier steps 2 through 7.
Open Class1.cs in the editor, and then rename the file to
include a character from a different language. For example, the following Turkish character: İ1.cs.
Build the project.
Press F5 to start debugging. Notice that the debugger prompts you to open the file, even when the
file is already open.
Compiler Warnings
You receive the warning message CS2002 when you compile the files
that have two similar file names. One is with Turkish characters, and the other
with the same file name but with Latin characters. For example, file1 has İ1.cs (Turkish Characters) and file2 has I1.cs (Latin characters).