Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help me how to set my program to multi byte character set using VS 2015..
I'm using C#.

What I have tried:

I can't find the Configuration Properties > Character Set in this Link..

https://studiofreya.com/2014/11/25/character-set-encoding-in-visual-studio-2013/
Posted
Updated 28-Feb-16 22:50pm
Comments
Richard MacCutchan 29-Feb-16 4:08am    
That link only works for C/C++ projects. What exactly are you trying to do?
berrymaria 29-Feb-16 19:40pm    
We have an old code and it has a katakana dot, when compiled to Visual Studio 2015, it has an error. Please what to do?
Richard MacCutchan 1-Mar-16 3:29am    
Sorry, but that does not tell us anything. You need to show the code and the error for anyone to be able to help you. Please edit your question and add full details of your problem.
berrymaria 1-Mar-16 3:53am    
Hi Sir, this is the example.. Please advise? This line runs in VS 2013..

https://dl.dropboxusercontent.com/u/28759525/middle%20dot.png

but doesn't in VS2015/2015 ..
Richard MacCutchan 1-Mar-16 4:31am    
Just change the name so it does not contain the dot.

1 solution

As far as I know there is no option. C# creates Unicode applications.

The only reason to use multi byte would be supporting Windows 9x. But even that can use Unicode with an additional DLL.

If you want to access files with multi byte encoding use the Encoding Class (System.Text)[^] to convert text (e.g. read MBCS file binary, convert to Unicode, process, convert back to MBCS, write binary).
 
Share this answer
 
Comments
berrymaria 1-Mar-16 4:30am    
Hi Sir, this is the example.. Please advise? This line runs in VS 2013..

https://dl.dropboxusercontent.com/u/28759525/middle%20dot.png

but doesn't in VS2015/2012 ..

public const string バー·ー = "0"; error due to ·

public const string バーー = "0"; no error
Jochen Arndt 1-Mar-16 4:53am    
This may be a problem with the encoding used by your source file. By default C# should use UTF-8. You should try to find out what kind of encoding is used by the source file and convert it if necessary. Check also if there is a BOM (Byte Order Mark) at the beginning of the file. If so Visual Studio will know the encoding.

You may also check the Unicode code point for the dot character in question to determine to which category it belongs. While punctuation characters are allowed, other's may be not.
See
https://msdn.microsoft.com/en-us/library/aa664670.aspx
and Chapter 4.5 at
http://www.unicode.org/versions/Unicode8.0.0/ch04.pdf

'Pc' would be allowed but not other P category types.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900