Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    maxon::String Fails to Display "º" in Control Name

    Cinema 4D SDK
    c++ windows
    2
    2
    145
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Viktor Velicko
      last edited by

      Hi guys,
      I'm having an issue creating attribute panel control names that include the degree symbol "º".
      For example, when creating a button control with the following Maxon string:


      Example A (works):

      const char* name_char = "Slope 90";
      maxon::String name_maxon(name_char);


      Example B (fails – button name is blank):

      const char* name_char = "Slope 90º";
      maxon::String name_maxon(name_char);


      The name_char variable is just for testing purposes. In the actual application, the string is read from the file system.
      The name_maxon string is then used to set the control name in the attribute panel.

      Any ideas why the degree symbol causes the control name to appear blank?

      Thanks!

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @Viktor Velicko
        last edited by ferdinand

        Hey @Viktor-Velicko,

        Thank you for reaching out to us. Generally, our codebase supports Unicode, but in C++ source code and in *.str resource files, we only support Unicode escape sequences, not Unicode symbols directly. In Python, we do support Unicode symbols directly. In the 2025.3 SDK, I just added a code example for how to use Python to create a Unicode escaping pipeline around *.str files.

        So, the Unicode string const String slopeLabel = "Slope 90º"_s; would be written as const String slopeLabel = "Slope 90\\u00b0"_s; in C++. A bit more verbose variant would be const String slopeLabel ="Slope 90"_s + String("\\u00b0", STRINGENCODING::BIT7HEX));. In Python, you can use the string directly as slopeLabel: str = "Slope 90°".

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • First post
          Last post