vs2022 can not display any Chinese in the output debug window only ??????????/


sdowney717

Well-known member
Member
VIP
Local time
5:22 PM
Posts
1,335
OS
windows 11
Pic shows test app running and the problem, which may have no solution?

And what is the lowest 'AUTOS' window at bottom of IDE, it does show the Chinese text.
At least get some feedback there if debugging. Worried if I close that, I will never get it back as I don't know what it's called.

I think it makes it harder to debug.

1715528700933.png

Still like this from 2020


WardenGnaw commented on Jun 30, 2020
The debugger can only handle ASCII characters at the moment, if you enable engine logging. You can see that we are printing the unicode values instead of the actual UTF-8 reprensentation.
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb

My Computer My Computer

At a glance

Windows 11AMD Ryzen 7 5700GMicron Technology DDR4-3200 16GBNVIDIA GeForce RTX 3060
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
HP Pavilion
CPU
AMD Ryzen 7 5700G
Motherboard
Erica6
Memory
Micron Technology DDR4-3200 16GB
Graphics Card(s)
NVIDIA GeForce RTX 3060
Sound Card
Realtek ALC671
Monitor(s) Displays
Samsung SyncMaster U28E590
Screen Resolution
3840 x 2160
Hard Drives
SAMSUNG MZVLQ1T0HALB-000H1

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
I'm not able to reproduce what you're seeing, but try adding a Console.OutputEncoding = System.Text.Encoding.UTF8 before your WriteLines.

Edit: Also check which font you're using for the output window : Tools | Options | Environment | Fonts and Colors. Show settings for : Output Window. I don't seem to have issues with Consolas or Cascadia Code.
 
Last edited:

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
What does this advice have to do with Visual Studio? This question is whether an app is written to support UTF-8 characters in all dialogs
What is your advice, instead of undermining my suggestion.
 

My Computer My Computer

At a glance

Windows 11AMD Ryzen 7 5700GMicron Technology DDR4-3200 16GBNVIDIA GeForce RTX 3060
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
HP Pavilion
CPU
AMD Ryzen 7 5700G
Motherboard
Erica6
Memory
Micron Technology DDR4-3200 16GB
Graphics Card(s)
NVIDIA GeForce RTX 3060
Sound Card
Realtek ALC671
Monitor(s) Displays
Samsung SyncMaster U28E590
Screen Resolution
3840 x 2160
Hard Drives
SAMSUNG MZVLQ1T0HALB-000H1
I'm not a dev, but my work experience teaches me this is probably a coding or tools-related problem. And resetting part of Windows isn't the first step to fix it.

Replying to most threads with a pre-posted video can be a disservice. What a few folks forget about the 80/20 rule -- is when to recognize a problem falls into the 20% that doesn't apply. If that happens, it's better to stay on the sideline and let someone else (like a @pseymour) lead the way.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
I would say mind your own business and let us through a few ideas as well i'm a developer but never used Visual Studio, so my next suggestion will be to clean font cache. Also i do what needed to resolve the problem at hand including videos, who are you to tell me what i should or not do.
 

My Computer My Computer

At a glance

Windows 11AMD Ryzen 7 5700GMicron Technology DDR4-3200 16GBNVIDIA GeForce RTX 3060
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
HP Pavilion
CPU
AMD Ryzen 7 5700G
Motherboard
Erica6
Memory
Micron Technology DDR4-3200 16GB
Graphics Card(s)
NVIDIA GeForce RTX 3060
Sound Card
Realtek ALC671
Monitor(s) Displays
Samsung SyncMaster U28E590
Screen Resolution
3840 x 2160
Hard Drives
SAMSUNG MZVLQ1T0HALB-000H1
I'm not able to reproduce what you're seeing, but try adding a Console.OutputEncoding = System.Text.Encoding.UTF8 before your WriteLines.

Edit: Also check which font you're using for the output window : Tools | Options | Environment | Fonts and Colors. Show settings for : Output Window. I don't seem to have issues with Consolas or Cascadia Code.
Tried the line here and I get an exception when it runs

System.IO.IOException
HResult=0x80070006
Message=The handle is invalid.

Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>

Tried switching font for output window to various fonts, and still shows ???????? in that particular window
It was set to Consolas. Also tried Lucida Sans Unicode. Issue is only in the output window.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Console.OutputEncoding = System.Text.Encoding.UTF8
Dim i, j As Integer
Dim LItem As ListViewItem
For i = 0 To ListView1.Items.Count - 1
LItem = ListView1.Items(i) 'first column, same as subitems(0)
Console.WriteLine(LItem.Text)

For j = 0 To LItem.SubItems.Count - 1
'Console.WriteLine(" " & ListView1.Columns(0).Text & " " & LItem.SubItems(0).Text)
Console.WriteLine(" " & LItem.SubItems(0).Text & " " & LItem.SubItems(1).Text & " " & LItem.SubItems(2).Text & " " & LItem.SubItems(3).Text)
' ListView1.Columns.IndexOf(0).text
' ListView1.Columns.Item(0).Text
MsgBox(LItem.SubItems(0).Text)
Next
Next
End Sub
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
Hmmm well it’s a little odd anyway that you’re using the Console class to write to the Output window. Is the source something you can send me so I don’t have to try to simulate it?
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
Hmmm well it’s a little odd anyway that you’re using the Console class to write to the Output window. Is the source something you can send me so I don’t have to try to simulate it?
sure, put a listview, button on a form

form load event, just delete the non relevant stuff
chinese text line seems to appear on this forum

LItem.Text = "圖圖3解弓月金難手中大"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim Fname As String
Dim Fsize As Single
Dim FgdiVfont As Boolean
Dim Fgdicharset As Byte
Dim Fstyle As Integer
Dim Funit As Integer
'need to get font settings in registry
Fname = GetSetting(My.Application.Info.Title, "Settings", "searchfontName", ComboSearch1.Font.Name)
Fsize = GetSetting(My.Application.Info.Title, "Settings", "searchfontSize", ComboSearch1.Font.Size)
Fstyle = GetSetting(My.Application.Info.Title, "Settings", "searchfontStyle", ComboSearch1.Font.Style)
Funit = GetSetting(My.Application.Info.Title, "Settings", "searchfontUnit", ComboSearch1.Font.Unit)
Fgdicharset = GetSetting(My.Application.Info.Title, "Settings", "searchfontCharset", ComboSearch1.Font.GdiCharSet)
FgdiVfont = GetSetting(My.Application.Info.Title, "Settings", "searchfontVerticalFont", ComboSearch1.Font.GdiVerticalFont)
ComboSearch1.ForeColor = System.Drawing.ColorTranslator.FromOle(CInt(GetSetting(My.Application.Info.Title, "Settings", "searchfontcolor", CStr(System.Drawing.ColorTranslator.ToOle(ComboSearch1.ForeColor)))))

'for font testing
'Fstyle = FontStyle.Bold Or FontStyle.Italic Or FontStyle.Strikeout Or FontStyle.Underline
'With ComboSearch1
'.Font = New Font(.Font.Name, Font.Size, .Font.Style, .Font.Unit, .Font.GdiCharSet)
'End With

'like something about registry or function is screwed, font not showing properly a user will just reset it
On Error Resume Next
ComboSearch1.Font = New Font(Fname, Fsize, Fstyle, Funit, Fgdicharset)
ComboSearch2.Font = ComboSearch1.Font
Combosearch3.Font = ComboSearch1.Font
' ComboSearch2.ForeColor = ComboSearch1.ForeColor
' Combosearch3.ForeColor = ComboSearch1.ForeColor



Dim LItem As New ListViewItem()
LItem.Text = "圖圖3解弓月金難手中大"
LItem.SubItems.Add("Anders Maria")
LItem.SubItems.Add("030-0074321")
LItem.SubItems.Add("030-0076545")
LItem.ImageIndex = 0
ListView1.Items.Add(LItem)

LItem = New ListViewItem()
LItem.Text = "Around the Horn"
LItem.SubItems.Add("Hardy Thomas")
LItem.SubItems.Add("(171) 555-7788")
LItem.SubItems.Add("(171) 555-6750")
LItem.ImageIndex = 0
ListView1.Items.Add(LItem)

End Sub



here is a button click where it happens
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Console.OutputEncoding = System.Text.Encoding.UTF8
Dim i, j As Integer
Dim LItem As ListViewItem
For i = 0 To ListView1.Items.Count - 1
LItem = ListView1.Items(i) 'first column, same as subitems(0)
Console.WriteLine(LItem.Text)

For j = 0 To LItem.SubItems.Count - 1
'Console.WriteLine(" " & ListView1.Columns(0).Text & " " & LItem.SubItems(0).Text)
Console.WriteLine(" " & LItem.SubItems(0).Text & " " & LItem.SubItems(1).Text & " " & LItem.SubItems(2).Text & " " & LItem.SubItems(3).Text)
' ListView1.Columns.IndexOf(0).text
' ListView1.Columns.Item(0).Text
MsgBox(LItem.SubItems(0).Text)
Next
Next
End Sub
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
@sdowney717

I am a little confused here, or else I am not reading things right.

Do you actually want the Chinese characters? Or not?

It's a little unclear from your post.
 

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2Intel i7 13700KF32 GB Team Group DDR5 - 6000 CL 30ASUS TUF GAMING RTX 3070 Ti
    OS
    Win 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Intel i7 13700KF
    Motherboard
    Gigabyte Z790 UD AC
    Memory
    32 GB Team Group DDR5 - 6000 CL 30
    Graphics Card(s)
    ASUS TUF GAMING RTX 3070 Ti
    Sound Card
    On board Realtek
    Monitor(s) Displays
    ACER 34 inch
    Screen Resolution
    Not 4K like I thought. 35" wide though.
    Hard Drives
    1 TB Samsung 980 Pro Nvme, 1 TB Samsung 970 EVO Nvme, 2 x Samsung 970 2TB SSD SATA
    PSU
    EVGA 1000Q
    Case
    Rosewill something or other
    Cooling
    Noctua NH-D15. A whole schwak of Noctua case fans. $$$
    Keyboard
    Logitech G815
    Mouse
    Logitech G502 Hero
    Internet Speed
    700 up, 600 down
    Browser
    Firefox
    Antivirus
    MalwareBytes
  • At a glance

    Widows 11 ProRyzen 2700X32 GB DDR4XFX Radeon R9 280
    Operating System
    Widows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Ryzen 2700X
    Motherboard
    MSI X470 Gaming Plus Max
    Memory
    32 GB DDR4
    Graphics card(s)
    XFX Radeon R9 280
    Sound Card
    Onboard
    Monitor(s) Displays
    Two 27 inch Acer monitors
    Screen Resolution
    1920 x 1080
    Hard Drives
    One 1 TB NVME (Samsung)
    PSU
    Corsair 750 Watt
    Case
    HAF 912
    Cooling
    Wraith cooler and case fans
    Keyboard
    Logitech G710+
    Mouse
    Generic
    Internet Speed
    700 down, 650 up
    Browser
    Firefox, Chrome
    Antivirus
    Malware bytes
@sdowney717

I am a little confused here, or else I am not reading things right.

Do you actually want the Chinese characters? Or not?

It's a little unclear from your post.
I would like to see the Chinese chars in the output debug immediate window, yes.
Makes it more consistent with debugging to see the output there when your used to seeing it there.

One of the reasons I wanted to convert a vb6 project was for the unicode ability in vbnet.

China chars show up in all the other windows, why not that one?

What do people of other countries do, when debugging, in their char sets.
see ??????????

Imagine an Indian programmer expecting to see Hindi chars and only gets ?????? marks.

I use the debugging window constantly when programming.
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
ok, will try it. That is good for debugging.
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
I have been using vs2008 and vs2022.
And originally wrote that in vs2008.
Something about console versus debug in 2008 may have caused me to use console.writeline.
I am pretty new to VS net , and am used to debug.print in vb6. Maybe I thought was not a significant diff between them.
And I saw examples online of using console.write
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
Back
Top Bottom