Questions tagged [mbcs]

MBCS is an abbreviation for "Multi-Byte Character Set" i.e. the representation of text using more than one byte per character.

MBCS is an abbreviation for "Multi-Byte Character Set" i.e. the representation of text using more than one byte per character. This is in contrast to "single-byte" encodings (such as ASCII or Latin-1) where each byte represents a single character.

For more information, please refer to this question: What is a multibyte character set?.

57 questions
1
vote
1 answer

Visual C++ - UTF-8 - CA2W followed by CW2T with MBCS - Possibly a bad idea?

I'm using a library that produces UTF-8 null-terminated strings in the const char* type. Examples include: MIGUEL ANTÓNIO DONA ESTEFÂNIA I'd like to convert those two const char* types to CString so that they read: MIGUEL ANTÓNIO DONA…
1
vote
2 answers

Converting from Windows MBCS to UTF-8

I have a very large (millions of lines) application which was developed using MBCS (codepage 1252) and assumes all strings are char* and each character is only one byte. We are now expanding our language set and need to move to Unicode. Since UTF-8…
1
vote
0 answers

MBCS Not present in VS2015 after installing MFC and VC++

I've recently upgraded to Visual Studio 2015 and trying to get some 2013 projects to build. According to MSDN documentation, the MBCS library is built into VS2015 as long as MFC and VC++ are installed. My projects' Platform Toolset is set to v120…
dajaffe
  • 855
  • 13
  • 34
1
vote
1 answer

How to represent Unicode characters in an API

This is more an MBCS question than a Unicode question. I need to create an API that returns a list of structs that each instance holds a Unicode character as one of its members. This is in .NET so you'd think I'd want UTF-16, but then for Asian…
Tony Lee
  • 5,622
  • 1
  • 28
  • 45
1
vote
2 answers

Python umlaut character issue - mbcs needed , is there a better way for all characters

I was having trouble with Python script opening a file which contained an umlaut character. Naturally I thought I could correct this with a unicode utf8 fix, but not so... I ended up using the mbcs ( default is cp1252) Then I wrote this…
Tom Stickel
  • 19,633
  • 6
  • 111
  • 113
1
vote
3 answers

How do I write MBCS files from a UNICODE application?

My question seems to have confused folks. Here's something concrete: Our code does the following: FILE * fout = _tfsopen(_T("丸穴種類.txt"), _T("w"), _SH_DENYNO); _fputts(W2T(L"刃物種類\n"), fout); fclose(fout); Under MBCS build target, the above produces…
Mordachai
  • 9,412
  • 6
  • 60
  • 112
1
vote
0 answers

Under what circumstances would an EDIT control treat MBCS as UNICODE?

I am maintaining a large legacy application build using MBCS. On a Windows 7 system with Japanese as the system locale and English as the UI locale I have an issue where the selection position of an edit control is being returned incorrectly. I…
MilesDavies192
  • 700
  • 6
  • 8
0
votes
2 answers

Does ANTLR for Java support MBCS?

I searched and couldn't find much about it. We need to provide the most general support for encodings and such and want to make sure ANTLR is going to be able to handle anything we throw at it.
mentics
  • 6,852
  • 5
  • 39
  • 93
0
votes
1 answer

Why is 'UNICODE' being defined?

I have three C++Builder 11 Win32 applications that I have inherited. They all use MBCS and not UNICODE. However, in only one of the 3, UNICODE and MBCS is defined in the debug build only. Of course, this is causing compile errors. I have checked the…
0
votes
0 answers

How to MIGRATE ANSI/MBCS Resources for Visual Studio 2019 C++ MFC project

I have an old VS2008 based MFC project. We need to stick with ANSI/MBCS based characters - Wide Characters are not utilized. However, it appears the Resource Editor .RC file output encoding is UNICODE (wide characters). What is the proper procedure…
franji1
  • 3,088
  • 2
  • 23
  • 43
0
votes
0 answers

How to work with substrings / delete character when content is mixed single and double byte?

I have an application, which unfortunately is written in Delphi 6, that allows the user to extract substrings / delete characters from input. The operator sees a TLabel, this is on purpose to avoid direct and incorrect input. This works fine for…
MyICQ
  • 987
  • 1
  • 9
  • 25
0
votes
1 answer

How to create filename with characters that are not part of UTF-8 on Windows?

[Edit/Disclaimer]: Comments pointed out that I have to clarify the encoding the user uses. Will update accordingly I have a customer from China who recently reported an issue with their filenames on Windows. The software works with most Chinese…
HelloWorld
  • 2,392
  • 3
  • 31
  • 68
0
votes
1 answer

how to read csv files with mbcs codec in Python on Linux?

I'm trying to read CSV files with Western Europe (windows) encoding df = pd.read_csv(FileName,encoding='mbcs', usecols=[1],header=4) This code works well on Windows but not on Linux 18.04. (Error: unknown encoding: mbcs) Indeed, in the codecs…
Joachimhgg
  • 47
  • 8
0
votes
1 answer

Is it guaranteed that trailing bytes in mbcs encodings are in specific range?

I need to read text file which contains strings in arbitrary MBCS encodings. Format of file (simplfied) is like this: CODEPAGE "STRING" CODEPAGE STRING ... where CODEPAGE can be any MBCS codepage: UTF-8, cp1251 (Cyrillic), cp932 (Japanese), etc. I…
Michael Ilyin
  • 717
  • 8
  • 15
0
votes
0 answers

VSO/VSTS and MBCS

I have an old VS2013 solution (20s C++ and C# projects) that need to be migrate to Visual Studio Team Services (VSTS). Unfortunately, some of the projects use mutibyte character set (MBCS). I used VSTS hosted build, but it failed with the error…
Chu Bun
  • 513
  • 1
  • 5
  • 17