Re: Ligature and VB

From: Michael \(michka\) Kaplan (
Date: Mon Oct 07 2002 - 09:42:48 EDT

  • Next message: Doug Ewell: "Re: ISO 8859-11 (Thai) cross-mapping table"

    From: Gopal Krishan

    > In one of my VB project, I'm sending PostMessage API function
    > to send character of my desired value to control. e.g. If I
    > need to send character J to the keyboard, I'm using

    > dim s as Long
    > s = PostMessage(Text1.hwnd, WM_CHAR, 99, 0)

    > where 99 is the ASCII value of character J in my font.

    > Now, in certain languages e.g. Japanese, Hindi and other
    > Asian languages, characters are made by combining 2 or
    > more different characters. e.g. character N of devnagiri in
    > some font will be made by combining ascii values 120
    > followed by 201.

    You are actually mistaking two different things here.

    CJK languages such as Japanese can be represented by either Unicode or a
    double byte value using a particular code page. The first value is
    specifically not an "ASCII" value since a DBCS lead byte will not be in the
    first 127 characters.

    But Devanagari can only be represented by Unicode, thus you must send a
    single Unicode code point in a PostMessageW function, and there is no
    non-Unicode method you can use.

    In any case, if you are using VB <= 6.0, you cannot have it represent a
    "Unicode only" script such as Devanagari; you cannot even represent Japanese
    if you are not on a system that has a Japanese default code page -- although
    you can temporarily "fool" VB by sending messages, the data can be very
    quickly corrupted since VB will convert data yo the default system code
    page, which will convert both of these things to '?' very quickly.

    > 1. Is there any way to send 2 characters in PostMessage function in 1
    > statement e.g. using Bitwise And
    > 120 to binary is 11110000
    > 201 to binary is 110010011

    No, there is not -- but this is not really something you need to do here?
    Just use Unicode code points and PostMessageW and then you do not ned to
    send bytes.

    > 2. Any freeware activex control / dll to make ligatures of TTF file?

    Not sure what you are looking for here from a control or dll to do.


    This archive was generated by hypermail 2.1.5 : Mon Oct 07 2002 - 10:45:34 EDT