Results 1 to 5 of 5

Thread: Unicode text is not appearing correctly in controls.

  1. #1
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21

    Unicode text is not appearing correctly in controls.

    Hi there,
    I am having an issue in my new gui sample project. I am experimenting with unicode and gui controls. My native language is not appearing correctly in gui contols. How to fix this issue. I am attaching my code and images of this issue. Please find attachments. Thanks in advance.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi!,

    the introduction of Unicode is in the beginning.
    The UI module does not support it in 1.10.0.0, but it is something which can be improved in further iterations.

    Full Unicode support will take some time - all string functions will need to have their Unicode counterparts + the GUI + file operations...


    Petr
    Last edited by Petr Schreiber; 13-07-2017 at 17:38.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    Petr, it seems the unicode is not good for some opengl codes such as shaders, i know about that from some purebasic codes posted by some users especially the shaders, look
    http://www.purebasic.fr/english/view...t=pjay#p495168
    the code : Prototype.i glGetUniformLocation(Program.i, name.s) should be changed to Prototype.i glGetUniformLocation(Program.i, name.p-ascii)
    the problem is that the newest purebasic version 5.6 is completely unicode, while many of the people prefer the previous version 5.44 which support unicode and ascii as well
    yes there is functions in pb 5.6 allow using ascii from unicode but i think it is complex to use, and only the professionals can use it. the fact is that 99% of the users are normal amateur users and not a pro. in any programming language.
    so i hope they make the new powerbasic a hybrid from unicode and ascii to allow using the two worlds without hassles
    Last edited by primo; 16-07-2017 at 12:29.

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Sure! There are no plans to go only Unicode.

    Both approaches have their place, both will be preserved.
    Pure Ascii occupies up to 2x less space, we want the programmer to decide when to use what.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    121
    Rep Power
    21
    Hi @Petr
    In above comment, Petr said that enabling unicode for GUI elements need to do some work. I have a qustion. In my little knowledge, these are the functions which needs to create a window from scratch. I think GUI creating functions in thinBasic are wrapping these functions.
    1. GetModuleHandle
    2. LoadCursor
    3. ExtractIconEx
    4. CreateSolidBrush
    5. GetSysColor
    6. RegisterClassEx
    7. CreateWindowEx

    And this is my question. For enabling unicode in GUI elements, does replacing these functions with their unicode version will work ? I mean except functions in number 4 and 5, all of them have unicode versions with "W" in their names. And like Petr said, if you want to preserve ASCII enabled GUIs, then we can use a "Define Unicode" statement abovet the script. If that statement is there, then interpreter will call the CreateWindowExW function instead of CreateWindowEx function.
    Last edited by kcvinu; 19-07-2017 at 13:46.

Similar Threads

  1. File names in a unicode world
    By harsh in forum File
    Replies: 0
    Last Post: 01-02-2017, 03:27
  2. Does ThinAir supports Unicode ?
    By kcvinu in forum thinAir General
    Replies: 19
    Last Post: 29-08-2016, 14:57
  3. HELP FILE : Unicode information swapped
    By Michael Clease in forum Fixed or cleared errors in help material
    Replies: 1
    Last Post: 09-03-2011, 12:19
  4. Is this ASCII, ANSI, UNICODE or something else?
    By martin in forum thinAir General
    Replies: 12
    Last Post: 29-04-2009, 09:56

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •