sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    Understand what encoding SketchUp 8?

    Scheduled Pinned Locked Moved Plugins
    7 Posts 4 Posters 738 Views 4 Watching
    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.
    • S Offline
      sahi
      last edited by

      SketchUp 5
      path = "C:\Users\Admin\Documents\моя модель.skp"
      encode_to_utf-8 path
      model.save path -> works
      Sketchup.open_file path -> works

      SketchUp 8
      path = "C:\Users\Admin\Documents\моя модель.skp"
      encode_to_utf-8 path
      model.save path -> does not work
      Sketchup.open_file path -> works

      What encoding supports Sketchup 8 to save the model?

      1 Reply Last reply Reply Quote 0
      • yorik1984Y Offline
        yorik1984
        last edited by

        Maybe
        path = "C:\Users\Admin\Documents\моя\ модель.skp"
        or 'C:\Users\Admin\Documents\моя модель.skp'

        1 Reply Last reply Reply Quote 0
        • jolranJ Offline
          jolran
          last edited by

          Maybe / ?

          1 Reply Last reply Reply Quote 0
          • S Offline
            sahi
            last edited by

            Problem in "Cyrillic"

            "Cyrillic" in utf-8

            Sketchup 5 and reads and stores

            Skutchup 6 7 8 only reads but does not save.

            Skutchup 6 7 8 reads "Cyrillic" in utf-8

            And when you save what encoding uses (cp1252 cp866??????)

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              I wrote about SketchUp and Unicode a while back: http://sketchucation.com/forums/viewtopic.php?t=20657

              Summary:
              Ruby 1.8 does not understand Unicode strings - it treat each byte as a character.
              Ruby 1.8 under Windows cannot read/write, handle files with multi-byte characters. Needs to be ASCII characters. This is because Ruby calls the A (ASCII) versions of the file system function instead of the W (Wide characters - unicode) versions.
              Ruby 1.8 under OSX is able to open unicode files.

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                Oh - you're using the open and save model functions of the API. Ah - now that is interesting. I'd expect, at least the recent version to use UTF-8.

                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sahi
                  last edited by

                  I wrote this script to

                  Perhaps what is in it and is not correct.
                  But Ruby is well aware of it, let's

                  string = File.join (File.dirname (FILE), "Моя папка"))

                  string = encode_to_cp1251 (string)

                  Dir.mkdir (string) -> works fine

                  And as Sketchup 5 works great

                  A Sketchup 6 7 8 only read but can not green triangle icon

                  Encodes from cp1251 to utf-8
                  And a coding of utf-8 cp1251 (Cyrillic)

                  In SketchUp 5 everything works fine


                  encode_utf-8_cp1251

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement