Announcement

Collapse
No announcement yet.

DBCS and Unicode Support ????

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

  • DBCS and Unicode Support ????

    Does (or will) PBDLL support Double-byte characters or unicode? Many people in our office are using win2000 and their systems support input and output of kanji characters. With a bit of work I can get VB to handle this even when developed on an english system but I was wondering what experiences people have had with PB in this regard.

    Also, API's like NetUserAdd() for adding users to NT domains require usernames and password passed as null terminated unicode strings. in VB you can do:

    Dim MyStr as String
    MyStr = "MyUserID"
    MyStr = StrConv(MyStr, vbUnicode)

    and for a lptr you can throw the string into a byte array and use

    lptrUserID = VarPtr(ByteArray(0))

    If Windows is (has) gone unicode and international, shouldn't Powerbasic follow seeing as it's a windows compiler? (Or are we going linux )



    ------------------

  • #2
    Paul,
    Check out MultiByteToWideChar API function.

    James


    ------------------

    Comment


    • #3
      I would vote against UNICODE strings only.

      The two main reasons I use PowerBasic are:
      ANSI Strings
      BYTE Alignment within types

      There already are options for different type alignments

      A compiler directive to use ANSI or UNICODE strings would be OK
      such as
      #STRINGTYPE ANSI ON

      Joe Murphy

      ------------------

      Comment


      • #4
        Joe --

        > I would vote against UNICODE strings only.

        If PB were to add built-in support for Unicode Strings, I feel very confident in saying that they would be handled as a new data type, not a replacement for the current string data type.

        -- Eric


        ------------------
        Perfect Sync: Perfect Sync Development Tools
        Email: mailto:[email protected][email protected]</A>



        [This message has been edited by Eric Pearson (edited September 29, 2000).]
        "Not my circus, not my monkeys."

        Comment


        • #5
          I sure hope you did not break a NDA.
          But, that would be great news, an even better suggestion than mine.

          Joe

          ------------------

          Comment


          • #6
            > I sure hope you did not break a NDA.

            I have absolutely no knowledge whatsoever about PowerBASIC Inc's plans, if any, to add Unicode support to PB. I was simply stating an opinion, based on the way I have observed PB, Inc. operating in the past. I can't imagine that they would ever remove or significantly change a basic data type like "strings".

            -- Eric


            ------------------
            Perfect Sync: Perfect Sync Development Tools
            Email: mailto:[email protected][email protected]</A>

            "Not my circus, not my monkeys."

            Comment


            • #7
              Maybe but with all windows platforms going to unicode and PB being a windows only compilerr something's gotta give.
              I'm not a big fan of doing to PB what unicode has done to VB that depending on the developing OS strings get coverted 1 or 2!! times before being processed. but I think you'll find in the next 5 years that ascii API are only kept for backward compatability. MS intl OS builds are comming together into one and they have to reconcile formats.
              If you have nothing to do with international versions then you may wonder why MS would pollute a fast efficient system like ASCII with Unicode but maintaining code bases for different languages is not worth the effort and unicode solves the issue.

              I'd like very much to see a wASCIIZ format added and a StrConv() function added.


              In the mean time I think I'll play with MultiByteToWideChar and try and make a DLL for international capabilities for myself (maybe include it on a conditional compile or something)...

              Thanks for your input

              Paul


              ------------------

              Comment

              Working...
              X