Text properties Ansi, UTF-16

Discussion in 'Basic4ppc Wishlist' started by berndgoedecke, Dec 20, 2007.

  1. berndgoedecke

    berndgoedecke Active Member Licensed User

    It would be nice to have the following, additional properties for the TextBox:
    bold
    italic
    and for file open:
    cASCII already exists, but
    Ansi and UTF-16 left.


    Best Regards
    berndgoedecke
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Note that you could set bold and italic (and other properties) using FormLib library.
     
  3. berndgoedecke

    berndgoedecke Active Member Licensed User

    Ansi and UTF-16

    and what is about Ansi and UTF-16 - file open
    Or is there an other way or Lib to convert to
    UTF-8.
    It's because of the UTF-16 encoded SQLite Dtabase.
    Showing datas in the textbox let fail the special letters like "ä" "ö" "ü" etc.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    It is possible to convert a complete file from UTF-16 to UTF-8 (using BinaryFile and Bitwise libraries).
    However, if this is a database file you can't treat it as a text file.
    Please try the following connection string:
    Con.Open("Data Source = " & AppPath & "\Northwind.sl3;UseUTF16Encoding=True")

    Replace the database name with your database file.
     
  5. BjornF

    BjornF Active Member Licensed User

    I feel like I am missing something here. :confused:

    "It's because of the UTF-16 encoded SQLite Dtabase.
    Showing datas in the textbox let fail the special letters like "ä" "ö" "ü" etc."

    I can enter ö, ä, å etc in a textbox, store that in a SQLite database and close the program, open it again and retrieve the letters to a textbox (via a table) without any problems and without using the "UseUTF16Encoding=True".

    all the best / Björn
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Basic4ppc uses UTF-8 by default.
    UTF-8 supports all characters.
    UseUTF16Encoding should be used when you get a database that you didn't create (at least not with Basic4ppc) and it is encoded with UTF-16.
     
  7. BjornF

    BjornF Active Member Licensed User

    Aha, then I understand. Thanks.:)
     
Loading...