Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Importing Fractions in a String?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Importing Fractions in a String?

    I may have gotten you a conversion table that you can use as a starting point.

    First off read this http://joelonsoftware.com/articles/Unicode.html. It will help explain unicode and encoding.

    I also found this and used it a reference guide http://symbolcodes.tlt.psu.edu/bylan...html#fractions

    I created 4 text files using Notepad. In each text file I have the following text:
    Code:
    �
    �
    �
    ⅓
    ⅔
    ⅕
    ⅖
    ⅗
    ⅘
    ⅙
    ⅚
    ⅛
    ⅜
    ⅝
    ⅞
    I then saved each text file with a different level of encoding. The four encoding choices where "ansi", "Unicode", "Unicode big endian", and "utf-8". These were the only encoding types that notepad offered to me. Using Alpha5 file.to_string() I read each text file and then analyzed the data. What I found is that based on the encoding method I got different data returned. If the encoding method was "Unicode" or "utf-8" I could then decipher what the vulgar fraction was.

    I am uploading a zip file. It contains a v12 database, the import script I wrote, and a table that the import script writes it data too. Also in the zip file are the four text files that I manually created.

    Granted this is only a starting point for your data conversion but at least is gets one step closer to your end goal.
    Attached Files
    Last edited by aschone; 03-13-2015, 01:48 PM. Reason: the dyslexia is strong with this one
    Andrew

    Comment


      #17
      Re: Importing Fractions in a String?

      After a little investigation in this, yes, those "vulgar fractions" are identified by unique unicode.
      As it shows in Excel for example, at least in my version, there is no function in Excel to define the unicode.
      Attempting to show the ASCII value of 1/8 in Excel returned 63 which is the ASCII for "?" as well.
      So, it appears, some applications, such as Excel (but ironically not Word) will acknowledge the unicode for these characters, while others (perhaps alpha is in this category) will not but will instead apply the ASCII value to that character instead of the unicode value, hence your dilemma.
      The question is not how to convert that unicode to ASCII. There are multitde of third party application that will do that. The question, so it seems, is that can you make alpha acknowledge the unicode for these vulgar fractions and other symblos?
      I do not know the answer to that but I have not come across any function or method in alpha to lead me to believe that. I guess we will have to ask alpha but in the meantime, it seems to me you have to settle with using either:
      1-An image of the fraction, assuming you are only dealing with 1/8 only.
      2-If you are dealing with more than one of these fractions, i.e. 1/8, 3/8, 5/8 etc, then you have to convert that to decimal in Excel, import the decimal, then convert that to the corresponding image, or
      3-Use two different fonts, a bigger font for the integer and a smaller one for 1/8 (one slash Eight) to give the illusion of an actual fraction rendering or better off, if a subscript font available in your version, use that instead
      I sent an email to Selwyn, awaiting his response.

      Comment


        #18
        Re: Importing Fractions in a String?

        Great, I just realized that I closed my old alpha email file and removed all previous correspondence ! so now, I do not have Selwyn's email anymore!
        Edit:
        Never mind, I was able to recover that folder and sent him an email.
        Last edited by G Gabriel; 03-14-2015, 09:21 AM.

        Comment


          #19
          Re: Importing Fractions in a String?

          Hi Gabe,

          Many thanks for your valuable contribution.

          I look forward to your reply with Selwyn's suggestion/recommendation.
          Regards
          Keith Hubert
          Alpha Guild Member
          London.
          KHDB Management Systems
          Skype = keith.hubert


          For your day-to-day Needs, you Need an Alpha Database!

          Comment


            #20
            Re: Importing Fractions in a String?

            Keith,

            What's your goal? How do you plan to use the imported data? Are you going to have to parse the one field into its component parts?

            I don't think you can store images in DBF character fields any more easily than you can unicode values.

            -- tom

            ps

            Have you tried importing the data from excel while mapping the field to an RTF memo field in Alpha?

            Comment


              #21
              Re: Importing Fractions in a String?

              Received a response from Selwyn, but...still under investigation.

              Comment


                #22
                Re: Importing Fractions in a String?

                Tom,

                The imported data is from door furniture manufactures which is used in Estimates and works sheets. This is both to confirm to the customer exactly what product they are buying and for the fitter, the same information. With a bit of luck, shared info cuts down on mistakes
                Regards
                Keith Hubert
                Alpha Guild Member
                London.
                KHDB Management Systems
                Skype = keith.hubert


                For your day-to-day Needs, you Need an Alpha Database!

                Comment


                  #23
                  Re: Importing Fractions in a String?

                  Per Selwyn:
                  you can print unicode values in a report by putting the unicode text in an html snippet and then using the printhtml() function.

                  this is how currency symbols for many countries are printed.

                  Comment


                    #24
                    Re: Importing Fractions in a String?

                    Hi Gabe,

                    Thanks for feedback from Selwyn.

                    I have used size = printhtml(Size) in a report and unfortunately I cant get the ? change back to the 8th fraction it was in the spreadsheet.
                    See screen shot of report.
                    Size_Report.PNG
                    Here is original before import:
                    Excel_Sizes.PNG
                    Last edited by Keith Hubert; 03-15-2015, 09:10 AM.
                    Regards
                    Keith Hubert
                    Alpha Guild Member
                    London.
                    KHDB Management Systems
                    Skype = keith.hubert


                    For your day-to-day Needs, you Need an Alpha Database!

                    Comment


                      #25
                      Re: Importing Fractions in a String?

                      Keith:
                      I have to leave to work. I will see what I could do when I get back.
                      Real quick to get you started, from what I understood from Selwyn, you need to put the unicode for the fraction in the body of the HTML.
                      Unfortunately, I do not have this function in my version, nor do I have supercontrols and the like so I can't do any testing, but to add the code say for 1/8 in the body of HTML, you do this:

                      here is your HTML body then add &#8539 and the rest of your HTML.

                      &#8539 I believe is the code for 1/8.
                      Try this and see what you get.
                      Last edited by G Gabriel; 03-15-2015, 10:29 AM.

                      Comment


                        #26
                        Re: Importing Fractions in a String?

                        Example
                        Here is the HTML:
                        Code:
                        <!DOCTYPE html>
                        <html>
                        <head>
                          <title>Page Title</title>
                        </head>
                        <body>
                          <h1>Showing Fractions in a web page</h1>
                          <p>Keith has a box that measures 5&#8539 by 10&#8541 by 6&#8538</p>
                        </body>
                        </html>
                        And here is how it will look in a browser:
                        Code:
                        [B][SIZE=5]Showing Fractions in a web page[/SIZE][/B]
                        
                        [SIZE=4]Keith has a box that measures 5⅛ by 10⅝ by 6⅚[/SIZE]
                        Last edited by G Gabriel; 03-15-2015, 08:29 PM.

                        Comment


                          #27
                          Re: Importing Fractions in a String?

                          Hi Gabe,

                          Thanks for getting back to me on this.

                          Unfortunately this does not really help as the data is in a spreadsheet which I'm trying to import into Alpha. As the fraction is part of the string being imported, I'm not to know what the code number is.

                          I have tried importing into HTML Memo field and the Import routine does not like that.
                          Regards
                          Keith Hubert
                          Alpha Guild Member
                          London.
                          KHDB Management Systems
                          Skype = keith.hubert


                          For your day-to-day Needs, you Need an Alpha Database!

                          Comment


                            #28
                            Re: Importing Fractions in a String?

                            I didn't mean for you to import HTML or to HTML.
                            Here is what you need to do:
                            1-Convert the fractions in the spreadsheet to decimal. You will need to create a new column showing the decimal.
                            2-Import the spreadsheet to alpha
                            3-Find the code for each one of these decimals. You might have to save these in the lookup as hard-coded or if you are dealing with a large variety of fractions, maybe save them in a small table and use lookup
                            4-Now that you have the code for each one of these fractions, then you need to write a script or a function to create the HTML from the field that has the integer and the field that has the code for the fraction.
                            This whole process could be automated both in the spreadsheet and alpha where you would just click a button and you will have the HTML ready for printing.

                            Comment


                              #29
                              Re: Importing Fractions in a String?

                              Hi Gabe

                              I was trying to upload spreadsheet but message board wont let me.

                              The spreadsheet is supplied to my customer from their supplier, I need to get the data into the application which is then used in a lookup table.

                              I cant get my customer to start changing things in the spreadsheet to make the import work.

                              Can you email me direct so I can send you the raw data.

                              Your help is appreciated.
                              Last edited by Keith Hubert; 03-23-2015, 08:22 AM.
                              Regards
                              Keith Hubert
                              Alpha Guild Member
                              London.
                              KHDB Management Systems
                              Skype = keith.hubert


                              For your day-to-day Needs, you Need an Alpha Database!

                              Comment


                                #30
                                Re: Importing Fractions in a String?

                                Keith,

                                what do you get if you export the excel sheet to csv? Can you post a sample csv file? If so, include a list of column / field names and data types desired in the dbf. There may be some way to parse the csv file. If you do this, please also include a print out or screenshot of the excel sheet itself, so we can easily compare the values in the csv with what you're seeing on screen in excel.

                                Comment

                                Working...
                                X