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
2
votes
2 answers

Risks of running on single byte character app on a MBCS OS

I have an MFC application where the Character Set is "Not Set". What are the risks associated with running this application on a OS that has a Multi Byte Character Set code page?
JonDrnek
  • 1,414
  • 3
  • 19
  • 37
2
votes
2 answers

MFC CEdit converts non-ascii characters to ascii

We have an MFC Windows Application, written originally in VC++ 6 and over the years updated for newer IDE, currently developed in VS2017. The application is built with MBCS (not unicode). Trying to switch to Unicode causes 3806 compile errors, and…
Bojan Hrnkas
  • 1,587
  • 16
  • 22
2
votes
2 answers

MBCS encoding unknown

I'm trying to open a file with MBCS encoding in Python but I'm getting an error. If I write: fileIN = open(filename, "r", encoding = "mbcs") I get: Traceback (most recent call last): File "/data/stru0039/Rotation/test.py", line 144, in
Felipe Moser
  • 323
  • 4
  • 19
2
votes
3 answers

Converting MBCS stream to UTF-8 and vice versa in C++

I'm using Visual C++ (VS2005) and compiling the project in Multibyte Character Set (MBCS). However, the program needs to communicate with a webapp (which is in utf-8) via XMLRPC. So I'm thinking maybe I can use MBCS internally and convert the…
Kev
2
votes
2 answers

Within Windows MBCS, what languages have 2 byte characters and what characters are they?

I have a legacy application that uses Window's old MBCS. The software is international, and uses code pages to make it work for other languages. I've read that Chinese contains multibyte characters. My question is, which ones and how do I…
Adrian
  • 10,246
  • 4
  • 44
  • 110
2
votes
2 answers

tchar safe functions -- count parameter for UTF-8 constants

I'm porting a library from char to TCHAR. the count parameter of this fragment, according to MSDN, is the number of multibyte characters, not the number of bytes. so, did I get this right? My project properties in VC9 say 'use unicode character set'…
Dustin Getz
  • 21,282
  • 15
  • 82
  • 131
2
votes
3 answers

Encoding unicode path with filesystem encoding breaks it

I do have the following path in the memory: video_path = u'C:\\Documents and Settings\\user\\My Documents\\Downloads\\\xf5iv - Neon Phoenix [Free DL].mp3' I'm trying to use it as a parameter in cmd, so I have to encode it. video_path =…
iTayb
  • 12,373
  • 24
  • 81
  • 135
1
vote
2 answers

How to make ::WriteFile work in UNICODE circumstance?

This code below doesn't work correctly since my MFC program is in unicode circumstance. ::WriteFile(hFile, TEXT("123456"), lstrlenW(TEXT("123456")), &dwByte, nullptr); ::CloseHandle(hFile); The result is "123", which is supposed to be "123456" I…
Dean Seo
  • 5,486
  • 3
  • 30
  • 49
1
vote
3 answers

How to convert UNICODE strings to MBCS in c#?

I have a UNICODE string (chinese) which I want to convert back to MBCS so as to add it as a parameter to an SQL query. (the column in SQL Server in varchar and so this conversion is necessary for me). How can I convert to MBCS in c#? Please help.…
praseo
  • 21
  • 2
  • 7
1
vote
0 answers

MFC dialogs caption fails with Unicode

I am trying to use Win32 functions like MessageBox or GetOpenFileName in Unicode mode but the caption always shows ??????????????. I have resources in different languages like Chinese or Hindi and all works well except for standard dialog…
Josep
  • 21
  • 4
1
vote
1 answer

Read *.txt file with German text, show it in my GUI -- characters with umlauts not correct

My world is: MFC, Visual Studio C++, using MBCS character set. Generally using CString as my favorite string type, but sometimes std:string as well. I can put German words in my string table and they show up in the GUI just fine - full of lovely…
Tullhead
  • 565
  • 2
  • 7
  • 17
1
vote
2 answers

Is it possible to have a multi-byte character with the Windows-1252 code page?

i know some locale's (e.g. Far East locales) have multi-byte character sets, where it takes multiple bytes to represent a character. i'd like to test my (ANSI) software's ability to cope with multi-byte characters. Except that i live in north…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
1
vote
5 answers

What multi-byte character set starts with 0x7F and is 4 bytes long?

I'm trying to get some legacy code to display Chinese characters properly. One character encoding I'm trying to work with starts with a 0x7F and is 4 bytes long (including the 0x7F byte). Does anyone know what kind of encoding this is and where I…
krebstar
  • 3,956
  • 8
  • 46
  • 64
1
vote
0 answers

Cannot create user at runtime with Query with parameters

I am using C++ Builder 10.2.3 (Rad Studio Tokyo 10.2.3) with Interbase 2017 I need to create users at runtime for my users registration. If I create the Query at runtime, in that case there is no parameter, it works. But this creates problems with…
Louis
  • 75
  • 6
1
vote
2 answers

Everytime I build a unreal engine project, vs keeps warning like this: unable to get MBCS string

2> --------------------Project: Default------------------------------------------- 2> MyProjectCharacter.cpp (0:01.59 at +0:00) 2> EXEC : warning : unable to get MBCS string (input text '??: ?? ??:%s%s 2> ', library C:\Program Files…
Qwer Asdf
  • 11
  • 1
  • 4