Results 1 to 21 of 21

Thread: VB6 - IDE: how use unicode?

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    VB6 - IDE: how use unicode?

    using the code Designer, how can i paste a unicode charaters?
    (ASCII table, the table charaters)
    (yes on Add-In)
    using the forms 2.0, i can use the unicode... but on IDE?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,671

    Re: VB6 - IDE: how use unicode?

    The IDE is not Unicode. But you can add Unicode support to Property Pages as long as you use Unicode controls.

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    "The IDE is not Unicode."
    i know that, but honestly we can do it using Add-ins, but i need more info
    "But you can add Unicode support to Property Pages as long as you use Unicode controls. "
    the forms 2.0 even the RichTextBox can use it(i have the functions for it)
    PS: you did excellent things, i'm doing too(clsImage = DIB's + pointers), console template and many more
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    Re: VB6 - IDE: how use unicode?

    To point out the obvious you could use tB instead and everything is unicode without additional code. Unicode forms and controls, unicode property box, unicode editor, unicode function names... You can make your function names using color emojis if you're a psycho.

  5. #5

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    what i want is only show all ASCII characters(more the table charaters) on IDE
    VB6 2D Sprite control

    To live is difficult, but we do it.

  6. #6
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,671

    Re: VB6 - IDE: how use unicode?

    Quote Originally Posted by joaquim View Post
    the forms 2.0 even the RichTextBox can use it(i have the functions for it)
    I would use Krool's Common Controls replacement instead.

  7. #7

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    changing the font to Terminal is good? but not compatible?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  8. #8
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,671

    Re: VB6 - IDE: how use unicode?

    Quote Originally Posted by joaquim View Post
    changing the font to Terminal is good? but not compatible?
    Only changing the font does not make the IDE Unicode capable.
    If Terminal is a good font? Yes, I guess. I use Consolas.
    In current Windows all fonts are Unicode ready (unless you install a custom font that is not).

    What these fonts are, is that they are mono-spaced (every character occupies the same width). That doesn't have to do with being Unicode or not.

  9. #9
    Hyperactive Member -Franky-'s Avatar
    Join Date
    Dec 2022
    Location
    Bremen Germany
    Posts
    477

    Re: VB6 - IDE: how use unicode?

    The Forms 2.0 controls are not intended for use with VB6 and often lead to unexpected errors or crashes. You should either use other Unicode-enabled controls, such as those from Kroll, or create your own Unicode-enabled controls using CreateWindowEx.

  10. #10
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,910

    Re: VB6 - IDE: how use unicode?

    The biggest problem I ran into trying to make the IDE fully unicode compatible was that it's not supported in the FRM (and other UI) files. Actually, it's not supported for string literals in BAS files either. Without those things, even if we re-write custom property windows, we're just never really going to get there. And, the code windows will never be Unicode either. Maybe that's the biggest problem, as we could rewrite all the controls to save Unicode properties in the FRX (and ..X) associated files. So, maybe it's the BAS files and code editor window that are the biggest hard-road-blocks.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  11. #11

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    yes i miss understood:
    0 - unicode is the charaters code!!!
    1 - font is the grafic\print way;
    even, if i'm wrong, please correct me(i'm learning now :P )
    VB6 2D Sprite control

    To live is difficult, but we do it.

  12. #12
    Junior Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    20

    Re: VB6 - IDE: how use unicode?

    Quote Originally Posted by joaquim View Post
    using the code Designer, how can i paste a unicode charaters?
    (ASCII table, the table charaters)
    (yes on Add-In)
    using the forms 2.0, i can use the unicode... but on IDE?
    The biggest problem lies in how the vb6 compiler uses unicode.

  13. #13

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    using Add-ins:
    1 - can i detect when IDE saves the files(thinking on event)?
    2 - can i save the file using the unicode codification?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  14. #14
    Junior Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    20

    Re: VB6 - IDE: how use unicode?

    This is for compiling files encoded in utf8 (without going through an IDE, directly using the command line for compilation)

    Any unicode character will fail to compile. Currently, the only way to obtain unicode is Twinbasic

    Attachment 196199

  15. #15

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    Quote Originally Posted by woeoio View Post
    This is for compiling files encoded in utf8 (without going through an IDE, directly using the command line for compilation)

    Any unicode character will fail to compile. Currently, the only way to obtain unicode is Twinbasic

    Attachment 196199
    i'm sorry, but i can't se the image: "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
    ok.. i can't use unicode on IDE, but we can use it with forms 2.0 and RichTextBox
    my big objective is better
    using Terminal font name, i can draw all ASCII charateres on a listbox without problem...
    the IDE is Terminal too(i changed), for paste it... but if i draw\write 'á'(like my keyboard have a different layout), i will get beta charater
    so what is is the best font name for resolve it?
    (if i need download one, i can do it )
    VB6 2D Sprite control

    To live is difficult, but we do it.

  16. #16
    Junior Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    20

    Re: VB6 - IDE: how use unicode?

    Quote Originally Posted by joaquim View Post
    i'm sorry, but i can't se the image: "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
    ok.. i can't use unicode on IDE, but we can use it with forms 2.0 and RichTextBox
    my big objective is better
    using Terminal font name, i can draw all ASCII charateres on a listbox without problem...
    the IDE is Terminal too(i changed), for paste it... but if i draw\write 'á'(like my keyboard have a different layout), i will get beta charater
    so what is is the best font name for resolve it?
    (if i need download one, i can do it )
    It doesn't matter. The attachment is just a screenshot of an error when I compiled a vb6 file encoded in unicode using the command line.

    It is indeed possible to solve the display issue by using Unicode-supported controls. Moreover, if unicode characters are used in the ide, they can also be converted to unicode encodings like \u4F6H.

    But I don't understand what you mean by changing "ide" to "terminal". Could you provide a screenshot for me to enjoy

  17. #17

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    ok... i'm sorry, my English can be confused.. i'm sorry..
    my VB6 IDE Font name, now, it's Terminal!!! because it can draw all ASCII characters!!!
    but isn't compatible with keyboard layout(like 'á'(combination keys) = beta.. tested)
    VB6 2D Sprite control

    To live is difficult, but we do it.

  18. #18
    Junior Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    20

    Re: VB6 - IDE: how use unicode?

    This behavior is actually very typical, and it’s not a bug in VB6 itself — it’s a limitation of the Terminal font.

    Why this happens

    Terminal is a DOS/OEM bitmap font.
    It was designed to cover ASCII and OEM character sets only, not Unicode.
    Because it is not a TrueType font, it has no support for combining diacritics or modern keyboard layouts.

    That’s why:
    • All ASCII characters render correctly ?

    • Dead keys and composed characters fail ?

    Your example is spot on:

    Key combination Expected Terminal result

    ' + a á ? or wrong symbol

    ~ + n ñ incorrect mapping

    This happens because Terminal simply does not contain combining character tables.

    How VB6 handles fonts

    The VB6 IDE:
    • Is ANSI-based internally

    • Relies heavily on the selected font for input parsing

    • Does not fully support Unicode-era input methods

    So choosing Terminal effectively forces the editor into DOS-like behavior.

    Recommended solutions (from best to worst)

    ? Option 1: Use a TrueType monospace font (recommended)

    If you want:
    • Monospaced rendering

    • Clean ASCII display

    • Proper keyboard layout support

    Try these:
    • Consolas (modern, clear, Windows default)

    • Lucida Console (closest visual match to Terminal)

    • Courier New (maximum compatibility)

    • DejaVu Sans Mono (excellent character coverage)

    • Fira Code / Cascadia Code (modern aesthetics)

    ? Lucida Console is usually the best compromise.

    ? Option 2: Limit Terminal to output only

    Use Terminal only for:
    • Debug logs

    • Fixed-width text alignment

    Keep a Unicode-compatible font for editing.

    ?? Option 3: Keep using Terminal (not recommended)

    You can, but you will lose:
    • Composed characters

    • International keyboard support

    • Any non-ASCII input reliability

    Only reasonable if you are building something explicitly DOS-style.

    Summary

    Terminal is a display font, not an input-compatible font.

    It can draw ASCII perfectly, but it cannot handle modern keyboard input.

    In VB6, choosing Terminal trades input capability for rendering fidelity.

  19. #19
    Junior Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    20

    Re: VB6 - IDE: how use unicode?

    The above is the answer I have analyzed your question through ai

  20. #20
    Junior Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    20

    Re: VB6 - IDE: how use unicode?

    Perhaps this vbccr control is also a good choice, as it is more abundant than form2.0.

    VBCCR Development Manual | VB6 PRO DOCS
    https://doc.vb6.pro/en/packages/vbccr/

  21. #21

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,960

    Re: VB6 - IDE: how use unicode?

    to be honest, i must use the Terminal for show all ASCII characteres.... if you know the Terminal 2.0 or similar(with keys combination), please tell me
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

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



Click Here to Expand Forum to Full Width