Skip to content

Win32/Win64 imshow() always shows window with garbled "Chinese" titles (UNICODE build) #27645

@GerHobbelt

Description

@GerHobbelt

System Information

MSVC/Win64/Win32 UNICODE build, using our own build rig (non-CMake-based)

Detailed description

Fix being filed as we speak. imshow() produces view panels with "Chinese garbled windows titles" and possibly other ills once you go for a UNICODE build, rather than an (old skool) ANSI build.
Turns out OpenCV code (highgui/src/window_w32.cpp) assumes a pure ANSI Win32 API usage & build only, which clashes very badly with modern application UNICODE builds, when you include imshow() as-is.

Suspect issues that MAY be related:

Steps to reproduce

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions