MVVS: MV Basic for Visual Studio

 View Only
  • 1.  Item ID's with invalid Windows characters

    Posted 05-03-2023 14:16

    At the risk of being told "You should not do that!", I'm working with a 35 year old code base that has been on Pick, AIX and Linux over the years. So, folks decided to used characters like asterisks ("*") and question marks ("?") in item ID's as delimiters. When archiving these items and moving them from Linux to Windows, I have functions for converting the ID's to URL's and back. However, these items will not move cleanly from the Linux folders to Windows folders. So, the question at hand is whether there's a good option for converting those item ID's in flight. Unfortunately, there are too many places where those ID's are embedded in code to go down the path of fixing them all, even though that might be preferable.

    An aside, WinSCP has implemented nice functionality that makes these conversions when moving from Linux to Windows and back...



    ------------------------------
    Jeff Teter
    Woodforest National Bank
    The Woodlands, TX
    ------------------------------


  • 2.  RE: Item ID's with invalid Windows characters

    Posted 05-03-2023 16:15

    Well, it isn't a matter of "not doing that"  - because we DO do that in MV land (although I wouldn't have thought the use of a question mark was great idea).

    Those MV databases that use directory files (U2 and OpenQM) use an encoding system for MV item-ids that are not supported by the O/S. For example, the asterisk character will be replaced by '%A'.

    The U2 encoding mechanism (well UV anyway; I'm assuming UD does the same) is DIFFERENT for Windows and *nix (whereas OpenQM uses the same encoding for both). And maybe that is the issue that you are encountering.

    If you have AccuTerm, you could use FTPICK to transfer the items between two open sessions. That would leave each session to take care of the encoding.

    Cheers,

    Brian



    ------------------------------
    Brian Speirs
    Senior Analyst - Information Systems
    Self Registered
    Wellington NZ
    ------------------------------



  • 3.  RE: Item ID's with invalid Windows characters

    ROCKETEER
    Posted 05-03-2023 21:57

    Hi, Jeff.

    Thanks for point this out, I did some testing and confirmed this is a problem. Currently when you compile BASIC program in the VS Code, we don't check file name conversion, so it will copy and compile BASIC back with a new name, which is not correct, I have logged an enhancement request for this to our engineers and hope we could provide a better solution for this, thanks.


    Best Regards.
    Charles.



    ------------------------------
    Chao Han
    Rocket Internal - All Brands
    Dalian CN
    ------------------------------