Announcement

Collapse
No announcement yet.

Language support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Language support

    I have request to make language support in Chinese for my software package GPR-SLICE. As a test, i have received some chinese characters which when I copy and paste look fine in Notepad, or Word, however, when paste into PB9, i just get ???? for the characters. Is there a setting which will import these characters into text easily...Or is there a setting to make in the PB compiler...

    Any help would be helpful...thanks...

  • #2
    >Is there a setting which will import these characters into text easily

    Not if they are wide (unicode) characters.

    If you want to handle wide characters, you will have to find another way to store your string literals, period. A STRINGTABLE resource or external data file come to mind; although you could, I suppose, use DATA statements if you store everything byte-by-byte.

    You're also not going to be able to use DDT syntax to display those characters.... you are going to have to do everything 'SDK' style using the "W" versions of the Windows' API functions.

    Here's a little starter demo for you...
    Directory List with Non-ASCII (Unicode) characters in file names 5-31-08

    That gets and displays unicode text and should get you a pretty good idea of what is going to be involved to add Chinese support to your application.

    Hopefully you have not already submitted fixed-price quote on this.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      RichEdit controls can display Unicode (Chinese etc) characters.

      See this thread for more help..
      http://www.powerbasic.com/support/pb...ad.php?t=40544

      If you want to type chinese characters this link might be useful..
      http://newton.uor.edu/Departments&Pr...nese_write.htm

      Good luck!
      Rgds, Dave

      Comment


      • #4
        Dean, here's a recent thread on Unicode ( http://www.powerbasic.com/support/pb...hlight=unicode ). Won't help with the IDe but may help otherwise.

        =========================================
        Never let the future disturb you.
        You will meet it, if you have to,
        with the same weapons of reason
        which today arm you against the present.
        Marcus Aurelius Antoninus (121-180 A.D.)
        =========================================
        It's a pretty day. I hope you enjoy it.

        Gösta

        JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
        LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

        Comment


        • #5
          Well, I succeeded.

          The Chinese distributor made a txt file corresponding to my menu items in Chinese. Then they told me to change in the control panel the Regional Language to include Chinese PRC...I did that, restarted the computer and walla...i had PB menu items in Chinese after reading in the txt file and diplay these as strings...

          When the regional language setting is off, the Chinese text of course appears with strange characters...e.g..."File","Îļþ"
          "create new project","н¨ÏîÄ¿"
          "transfer data","µ¼ÈëÊý¾Ý"
          "create new info","н¨ÐÅÏ¢"

          However, display this with the Regional Language setting and you will get Chinese.

          Of course to make an executable independent of the installed language would be a larger task as outlined in some of the replys to this thread.... I just thought I should followup with a simple, easy solution that works. The only requirement is to take out all the text and menu items and read these in based on the language requirement...

          Comment

          Working...
          X