CodePage Information

From: Abdij Bhat (Abdij.Bhat@kshema.com)
Date: Thu May 22 2003 - 02:55:35 EDT

  • Next message: Christopher John Fynn: "Re: Persian or Farsi?"

    Hi,
     We have a GUI software that is running on win NT/2K/XP/95/98/ME. The
    software is developed using Visual Studio 6 and has a common source code
    base for all supported Win OS.
     The GUI software interacts with a hardware to get running data to be
    displayed on the UI. The GUI is to be internationalized. The Hardware does
    not understand UNICODE and can understand only ASCII. The minimum language
    support of the GUI software are Chinese, Dutch, French, German, Italian,
    Japanese, Portuguese, Spanish, UK Eng.
     We tried having our own protocol (including Unicode BOM) to achieve this.
    What we did was to push a byte stream of Unicode characters. This did not
    work well since the hardware truncated the Unicode string to the first NULL
    character received!
     Then we tried to Ascii encode the string (i.e. if the Unicode string was
    "In", the Unicode string would be "42 00 69 00", the ASCII encoded string
    would be "34 32 30 30 36 39 30 30". Thus we are encoding 4 as 34 (ASCII
    value), 2 as 32, 0 as 30 etc..). But I do not like the idea. This has
    various pitfalls. ( Interested parties can contact me for more details!).
     Also the problem is that the Hardware is an intelligent device and stores
    some of the Unicode Strings. Since previous versions of GUI were Ascii and
    there are huge installations of the software/hardware, chances are that
    there will be hardwares having Ascii strings in them even if we migrate the
    UI to Unicode. We should be thus able to handle a mix of Unicode and Ascii
    characters.

     Hence after a typical brainstorming session we decided to not throw Unicode
    strings at the hardware at all, instead convert them to Ascii as send. We
    thought of using WideCharToMultiByte() and MultiByteToWideChar() API's to do
    the same. These functions use CodePage to do the conversions.
     Do you think it is a wise idea to use this method?

     Also since the Application can switch between languages, will there be any
    potential problems?

     And what CodePages do I use for each of these (Chinese, Dutch, French,
    German, Italian, Japanese, Portuguese, Spanish, UK Eng.) languages?

     Please enlighten...

    Thanks and Regards,
    Abdij Bhat
    Kshema Technologies
    mailto:abdij.bhat@kshema.com
    www.kshema.com
    Phone:+91 80 860 3600 (Extension 2102)
    Fax: +91 80 860 3372



    This archive was generated by hypermail 2.1.5 : Thu May 22 2003 - 04:15:50 EDT