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
    • Recent
    • Tags
    • Users
    • Login

    Foreign accented characters

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 637 Views
    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 Offline
      Helper
      last edited by

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

      On 24/05/2008 at 20:04, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.x 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      When I try to print to the console, something like this:

      "Olá, estaria um muitíssimo bom dia, não fossem as poças de água"

      (this is portuguese, don't bother in translating it ;))

      ...I get a lot of weird characters where the accented characters are.
      This also happens when providing a title to a dialog, for example.
      I tried to create a routing to change all accented characters to their non-accented version:

      > \> clean_diacritics(sentence) \> {     var clean,size,f,new_char; \> \>      size=sizeof(sentence); \>      clean=""; \>      for(f=0;f<size;f++) \>           { \>           new_char=strstr("áéíóúàèìòùâêîôûãõäëïöüÁÉÍÓÚÀÈÌÒÙÂÊÎÔÛÃÕÄËÏÖÜçÇ",tostring(sentence[f],"c")); \>           if(new_char>=0) \>                clean=stradd(clean,strmid("aeiouaeiouaeiouaoaeiouAEIOUAEIOUAEIOUAOAEIOUcC",new_char,1)); \>           else \>                clean=stradd(clean,tostring(sentence[f],"c")); \>           } \>      return clean; \> } \>

      But his didn't work 😞
      Is there any way to correctly show or even access the accented characters?
      Thank you in advance for any reply 🙂

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

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

        On 24/05/2008 at 21:13, xxxxxxxx wrote:

        The characters must be in Unicode format. It is possible that using the characters the way you are is translating into some other format (?). For instance, in my .str files, the format is specified like this:

        "S\u00ed"

        for Sí and where \u00ed is the accented i from Espanol.

        You can get Unicode information online or from the Unicode link in the 'string' section of the COFFEE SDK docs.

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

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

          On 25/05/2008 at 17:52, xxxxxxxx wrote:

          Thank you for the answer, Robert. The problem is that I get the strings in the format in that they are typed. That means that I would have to create a routine to analize them and convert them to Unicode. But I can't make much of the codes I get from the original string. For example, if the original string is:
          > "aeiou" (but the acented version with the accent equal to the one you showed in your previous post) I can't type the correctly accented characters here because they get "dirty" too, when posted.
          The output of:
          > <code> for(var f=0;f<sizeof(line);f++) println(line[f]); </code>
          is: 8730 176 8730 169 8730 8800 8730 8805 8730 8747 I reached the conclusion that 8730 is an indicator that the following character is a Unicode character. The problem is to understant that the 176,169,8800,8805 and 8747 are. They are decimal numbers that, I confess, I can't match with anything I see in Unicode tables. Any ideas? 😉 Rui Batista

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

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

            On 25/05/2008 at 18:37, xxxxxxxx wrote:

            The Unicode values are specified in hexadecimal - but if converting these still doesn't add up to similar Unicode, it may be that they're in another format - such as UTF-8 or something.

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

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

              On 26/05/2008 at 16:49, xxxxxxxx wrote:

              The problem that I have is that, if I print the string to the console (with println), it prints out fine. When I use the same string in a TextDialog or in SetTitle, it prints out all wrong 😞
              The strings are read from a file and I can't control what is there. I mean, it can contain accented characters or not. I have to print them to the console (it prints file) but I may also have to use them in TexDialog or in SetTitle. In that case, the string appears all messed up. What can I do to make it work? Don't forget I'm using COFFEE 🙂

              Rui Batista

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

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

                On 26/05/2008 at 17:15, xxxxxxxx wrote:

                That's going to make it difficult. For dialogs and such, the strings must be in Unicode formatting - as if you were doing another language .str file for the dialog for instance.

                Do you know what extended-character formatting these files are in by chance?

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

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

                  On 26/05/2008 at 18:59, xxxxxxxx wrote:

                  The files are saves as MacRoman encoding (plain ASCII) and they are read using:
                  > file_source=file_data->ReadString(file_data->GetLength(),GE_8BIT);
                  When I print the variable file_source to the console, using:
                  > println(file_source);
                  It prints out fine. But is I use, for example:
                  > TextDialog(file_source);
                  It messes all the characters. The funny thing is that if I perform a simple test of creating a variable with the accented characters with:
                  > var test="the accented characters go here" TextDialog(test);
                  (I didn't typed the accented characters here because they also appear messed up here) it all prints out fine!! WEIRD!!!

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