Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    String / PChar

    SDK Help
    0
    10
    717
    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.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 19/03/2004 at 06:18, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.207 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      The [] operator of String returns a PChar....what the hell ich a PChar? Is is not documented in the cinema sdk, and also if I try to do something like this:
      string test("asdf");
      PChar s = test[1];
      if fails, because PChar is not a known type....
      At least the [] operator seems to return a valid unicode value, but what about that PChar??? It should be something like an unsigned 32Bit value, right? So would it be ok if I use ULONG instead of PChar? And why cant I use PChar? Even if I look in c4d_string.h, PChar occures...so somehow, somewhere it should be defined?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 22/03/2004 at 05:16, xxxxxxxx wrote:

        Hi,

        in c4d_string.h:

        class String
        {
        ...
             public:
        class PChar {...};
        ...
        };

        Please test

        String test ("hallo");
        String::PChar p = test[1];

        or use GetCString()

        aws

        TZ

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 22/03/2004 at 05:26, xxxxxxxx wrote:

          Well...hrm....maybe I really should get some glasses 😉
          But one thing I dont understand remains....for the characters there is also used UWORD. What is a UWORD? Is is 16bit or 32bit? 32bit I guess...at least it should be for use with unicode...right?

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 22/03/2004 at 06:06, xxxxxxxx wrote:

            typedef unsigned short int     UWORD;

            i think, this is unicode

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 22/03/2004 at 06:30, xxxxxxxx wrote:

              unsigned short int?????? This is 16bit! Unicode is 0...D7FF and E000...10FFFF inclusive! It definitely needs 32Bit!!!

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 22/03/2004 at 06:58, xxxxxxxx wrote:

                many types of unicode exists. I think, Cinema use the 2Byte-Unicode

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 22/03/2004 at 07:36, xxxxxxxx wrote:

                  Hm no....have a look on www.unicode.org, only one type of unicode is defined! There are several possibilities how to store the characters, UTF-8, UTF-16, UTF-32, big endian and low endian variants of it....but the possible range of a character is always 32 Bit!

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 22/03/2004 at 07:58, xxxxxxxx wrote:

                    Hm....seems that the whole windows world only uses 16Bits for unicode chars........in case of doubts, its always the evil microsoft 😉

                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 22/03/2004 at 15:10, xxxxxxxx wrote:

                      The current version of Unicode (4.0) does indeed require a 32 bit space for characters, though there are some schemes for fitting this into 16 bit spaces using surrogate pairs. If you need to fit such characters into a String, I suggest you treat it as UTF-16. (The first Unicode version to reserve characters above 16 bits was 2.0, which even predates the addition of the Euro character.)
                      However, all of this is kind of lame to argue about anyway, since the major bottleneck for full Unicode support in C4D is in the GUI.

                      1 Reply Last reply Reply Quote 0
                      • H
                        Helper
                        last edited by

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 22/03/2004 at 22:37, xxxxxxxx wrote:

                        Hm, for me it is still important how cinema handles the unicode strings, after a check of our demands I can say that I can live with 16 Bit. For the gui we will have to build some workaround, in a first step we will display our strings as bitmaps, which will be rendered in background, in a second step we want to build a customgui element which will hopefully be able to edit, maybe with some kind of virtual keyboard, or we will call an external editor for our strings.....dirty, but we really need to supply unicode strings to our plugins.

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