mbcs

Why isn't UTF-8 allowed as the “ANSI” code page?

旧城冷巷雨未停 提交于 2019-12-17 16:20:05
问题 The Windows _setmbcp function allows any valid code page... (except UTF-7 and UTF-8, which are not supported) OK, not supporting UTF-7 makes sense: Characters have non-unique representations and that introduces complexity and security risks. But why not UTF-8? As I understand it, the "ANSI" versions of the Windows API functions convert their arguments to UTF-16, call the equivalent "W" function, and convert any strings in the output to "ANSI". This is what I've been doing manually. So why can

MFC Multibyte Add-on for Visual Studio 2015 Express for Desktop

余生颓废 提交于 2019-12-14 03:19:28
问题 I'm using VS 2015 Express for Desktop which doesn't have MFC Multibyte support by default. Not long ago there was a separate MFC MBCS DLL Add-on. But now link to Multibyte MFC Library for Visual Studio 2015 is removed. That was done because all other VS editions have "Microsoft Foundation Classes for C++" optional install component: But VS 2015 Express for Desktop lacks it (it has no optional install components, no "Custom" installation at all) So the questions are: Maybe someone has a backup

Side-effect of deprecation of MBCS support for MFC in VS 2013

大憨熊 提交于 2019-12-11 17:58:04
问题 I just tried to compile an old MFC app under VS2013. It complained that non-Unicode MFC applications were deprecated, and refused to compile. Which is somewhat contrary to this announcement that talks about deprecating support for MBCS. Until now there were three choices for the Character Set option: Unicode MBCS Not set Personally, I'm entirely comfortable with dropping support for MBCS - I neither want nor need MBCS. But nor do I want nor need Unicode - ANSI/ASCII is just fine by me. So

Piecewise conversion of an MFC app to Unicode/MBCS

空扰寡人 提交于 2019-12-04 03:28:30
问题 I have a large MFC application that I am extending to allow for multi-lingual input. At the moment I need to allow the user to enter Unicode data in edit boxes on a single dialog. Is there a way to do this without turning UNICODE or MBCS on for the entire application? I only need a small part of the application converted at the moment. Is it possible to do this piecewise, and if so, how? Clarification: I could use ::GetWindowTextW() to get Unicode information out of the window. I am trying to

Error in manage.py runserver with Django on windows 8.1

百般思念 提交于 2019-12-04 01:42:40
问题 I couldn't find this exitcode anywhere but hopefully one of you could help me or let me know if this is a bug in python/Django. Anyway, first here's the stacktrace: Traceback (most recent call last): File "C:\Sitezooi\SiteTest\manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "C:\Program Files\Python\lib\site-packages\django\core\management\__init_ _.py", line 385, in execute_from_command_line utility.execute() File "C:\Program Files\Python\lib\site-packages\django

Piecewise conversion of an MFC app to Unicode/MBCS

浪子不回头ぞ 提交于 2019-12-01 17:47:07
I have a large MFC application that I am extending to allow for multi-lingual input. At the moment I need to allow the user to enter Unicode data in edit boxes on a single dialog. Is there a way to do this without turning UNICODE or MBCS on for the entire application? I only need a small part of the application converted at the moment. Is it possible to do this piecewise, and if so, how? Clarification: I could use ::GetWindowTextW() to get Unicode information out of the window. I am trying to figure out how to allow the user to enter Unicode text in the window. Currently, characters the user

Error in manage.py runserver with Django on windows 8.1

跟風遠走 提交于 2019-12-01 09:25:29
I couldn't find this exitcode anywhere but hopefully one of you could help me or let me know if this is a bug in python/Django. Anyway, first here's the stacktrace: Traceback (most recent call last): File "C:\Sitezooi\SiteTest\manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "C:\Program Files\Python\lib\site-packages\django\core\management\__init_ _.py", line 385, in execute_from_command_line utility.execute() File "C:\Program Files\Python\lib\site-packages\django\core\management\__init_ _.py", line 377, in execute self.fetch_command(subcommand).run_from_argv(self.argv

How to know the preferred display width (in columns) of Unicode characters?

两盒软妹~` 提交于 2019-11-29 21:53:23
In different encodings of Unicode, for example UTF-16le or UTF-8 , a character may occupy 2 or 3 bytes. Many Unicode applications doesn't take care of display width of Unicode chars just like they are all Latin letters. For example, in 80 -column text, which should contains 40 Chinese characters or 80 Latin letters in one line, but most application (like Eclipse, Notepad++, and all well-known text editors, I dare if there's any good exception) just count each Chinese character as 1 width as Latin letter. This certainly make the result format ugly and non-aligned. For example, a tab-width of 8

How to know the preferred display width (in columns) of Unicode characters?

我与影子孤独终老i 提交于 2019-11-28 17:44:49
问题 In different encodings of Unicode, for example UTF-16le or UTF-8 , a character may occupy 2 or 3 bytes. Many Unicode applications doesn't take care of display width of Unicode chars just like they are all Latin letters. For example, in 80 -column text, which should contains 40 Chinese characters or 80 Latin letters in one line, but most application (like Eclipse, Notepad++, and all well-known text editors, I dare if there's any good exception) just count each Chinese character as 1 width as

Why isn't UTF-8 allowed as the “ANSI” code page?

橙三吉。 提交于 2019-11-27 22:03:45
The Windows _setmbcp function allows any valid code page... (except UTF-7 and UTF-8, which are not supported) OK, not supporting UTF-7 makes sense: Characters have non-unique representations and that introduces complexity and security risks. But why not UTF-8? As I understand it, the "ANSI" versions of the Windows API functions convert their arguments to UTF-16, call the equivalent "W" function, and convert any strings in the output to "ANSI". This is what I've been doing manually. So why can't Windows do it for me? The "ANSI" codepage is basically legacy: Windows 9X era. All modern software