Problem displaying Hebrew characters in VS debugger with char/CString - c++

I am having trouble with displaying Hebrew characters in Visual Studio.
In my app, they are printed right and well, but in Visual Studio while debugging, I get this:
I have to mention that I am using codepage 1255, I can't use Unicode because my source is big and it would take years to convert.

Related

Word Separators for Text Editor in Visual Studio 2017

How can I set the Word Separators for Visual Studio 2017. Right now Ctrl-Left and Ctrl-Right stop at too many places, even compared to VS2008. Can someone point out where that is setup?
TIA!!

Visual Studio 2017 create new files with ansi encoding

I'm using Visual Studio 2017.
When I create a new view when developing asp.net core MVC, the new file is saved with ANSI encoding. To solve it, I need to open the file in Notepad++ and then change the encoding to UTF8 with BOM.
Update:
Its only asp.net views that are created in ANSI, all other files like .cs are in utf8 by default.
Convert your ANSI files to UTF-8. I used notepad++ for that and symbols and accents render was fine then.
Also you can take a look at this post MVC .net core is not displaying special characters correctly

Why does Visual Studio treat ANSI Escape codes differently when debugging?

Applies to:
Visual Studio Community Edition 2015 (C++)
Windows 10
Visual Studio has two ways to run a C++ program for Win32 Console: "Start Without Debugging (Ctrl+F5)" and "Start Debugging (F5)". Both will launch a separate console window for the program. If the program sends ANSI escape codes via cout, the first window works as expected, but the second will show the codes as characters, with unprintable codes such as ESC replaced by a question mark in a box.
Why is it different? Is there a way to get the ANSI escape codes to behave normally while debugging?
The 2015 documentation does not say that there is a restriction (earlir versions required the paid version).
With Visual Studio, you can use the debugger to attach to a running process, which would avoid the problem — provided that your program can initialize and wait for you to do this.
As for why it is different, that is probably because the debugger is intercepting the input/output of the program running in the console window (and preventing it from changing the I/O modes).
Further reading:
Attach to Running Processes with the Visual Studio Debugger (2015)
How to: Attach to a Running Process (2010)
From followup comments, #Sean-Gugler realized that
the executable's ANSI codes were not interpreted when it is run natively (e.g., opening from the File Explorer),
but worked when run normally from Visual Studio.
On being reminded that Windows 10 console window interprets ANSI escape sequences,
he verified that the executable ran as expected in a console window, and
surmised that Visual Studio was running the executable directly (without a console window) when debugging (F5), but did run it in a console window when running the executable normally (ctrlF5).
One of the problems in starting a console application from a GUI (such as Visual Studio) is that the application would have to do some extra work to allocate a console.
Further reading:
Can one executable be both a console and GUI application?
Using the console in a GUI app in windows, only if its run from a console
How to write to the console in a GUI application

Visual Studio 2012 / 2013 Syntax Highlighting errors

I have a problem with syntax highlighting in visual studio 2012 and 2013 preview with C++. I've had this problem since I installed both a few days ago (tried 2013 after I saw the problem in 2012).
As you can see from below, the colours are completely messed up in the text; some keywords such as int aren't properly highlighted, the grey return value is completely broken on various texts, the class colours have merged with various texts etc.
I've done the usual stuff found from google but had zero success, such as:
Reset intellisence from %appdata%
Reset user settings via command prompt or from Tools -> Import & Export settings
Turned off hardware acceleration in Visual Studio options.
This does not happen at all in Visual Studio 2010 fortunately, so I've kept that on my machine in the mean time. I did install 2012 and 2013 while 2010 was still present on my machine, but during install, i did not select the options to import 2010 settings, so "technically" they should have been clean IDE installs. The only other thing I've noticed is; when you start a project in 2012 or 2013, all the code highlighting is completely correct, but as soon as you change or add any text, everything messes up (like in the above image). So it does seem that Intellisense or whatever controls the highlighting only functions once on start up, and suddenly stops working for the duration of the program.
Delete this key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache
and restart vs2013.
Found it in a discussion on codeplex. Although my problem was the lack of colors, you should try it
I can't offer a solution to this issue, but I can tell you that it's an issue that's plagued Microsoft Visual Studio 2012. In VS2010, the highlighting was fairly basic for C++, as you couldn't set the colouring on user types and loads of other things.
In VS2010, like you I had no problem with the syntax highlighting at all, but there was a lot less that you could actually highlight. Ever since they introduced this extra highlighting for C++ so you could colour a lot more items, it's been very buggy.
At the moment, I've got operators in all sorts of colours, matching brackets and braces in different colours and half-coloured qualifiers etc. I've just had to live with it... but if you're reading this MS, please... PLEASE... pretty please get it fixed.

C++ copy formatted code to word (like Visual assist's)

I've browsed but could not find an answer..
I'm trying to copy code from my editor to look like the VA coloring, but it only copies like the VS coloring..
(Another great option would be to somehow do it like StackOverflow formats, but I could not find how to do that as well)
I've found:
http://www.wholetomato.com/products/features/rtf.asp
But it does not show where it is, nor can I find it (VS 2010)..
Does anyone know how to do it?
Or does anyone has an idea on how to copy formatted code to word?
Thanks!
A quote from the page you linked to:
Microsoft Visual Studio
Copying HTML to the clipboard is a built-in feature of Microsoft Visual
Studio and Visual Assist X does not enhance the feature. The
clipboard contains only the default colors of the IDE. Enhanced syntax
colors are not placed in the clipboard.
So it seems like what you want cannot be done.
If your ultimate goal is to make a final pdf, you can convert text file to pdf and combine your code pdf to your word pdf. You can try notepad++ for your default coloring your code.
Sorry but,
Microsoft Visual Studio
Copying HTML to the clipboard is a built-in feature of Microsoft Visual Studio and Visual
Assist X does not enhance the feature. The clipboard contains only the default colors of
the IDE. Enhanced syntax colors are not placed in the clipboard.
The feature you've meant was available only at Visual C++ 6.0.
VC++ 6.0 has no embedded ability to copy formatted code so they made their own realization of this feature in their plugin.
If you want just have VAssistX colored pdf you can try to print document in Visual Studio using any pdf printer such as PDFCreator then you can import it in Word (at least in LibreOffice Writer).