Results 1 to 1 of 1

Thread: Converting legacy data to Unicode/UTF-8 in Lianja v2.0

  1. #1
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,159
    Blog Entries
    22

    Converting legacy data to Unicode/UTF-8 in Lianja v2.0

    A "Code page" in Microsoft Windows is used to represent text in non-english languages.

    For modern applications UTF-8 is the preferred encoding as this is better understood by web browsers.

    UTF-8 is a muti byte character encoding of Unicode that can represent any language and is device and operating system independent.

    Most VFP developers have used localized code pages e.g. german, french, etc so the data that they have in their databases is code page specific.

    We recommend that you use UTF-8.

    A number of developers have requested a way of converting their databases from code page data to UTF-8 so I have added this functionality into v2.0.

    I would recommend that you make a copy of your database first and convert that copy. If all looks fine then you can perform the conversion on your real database.

    The following steps describe the process for data conversion.

    Step 1

    Open the App Builder

    Step 2

    Copy the database

    Step 3

    Code:
    convertutf8 database barry
    The screen shot below shows you that initially any code page data cannot be displayed as I have en_US has my data locale. The chr(220) is a german Ü character in the german code page.

    Name:  Screen Shot 2015-06-08 at 1.41.29 PM.jpg
Views: 1077
Size:  103.4 KB

    After conversion completes you should now add the --utf8 command line switch to the Lianja desktop shortcut.

    Name:  Screen Shot 2015-06-08 at 1.41.54 PM.jpg
Views: 1174
Size:  51.4 KB

    Run the App Builder now with the --utf8 command line switch and you can now see that the data is now displayed as Unicode as the data is now stored in UTF-8 format.

    Name:  Screen Shot 2015-06-08 at 1.42.33 PM.jpg
Views: 1292
Size:  64.2 KB
    Last edited by barrymavin; 2015-06-08 at 12:56.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us