$if 0 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ· PowerBASIC v3.20 ÚÄÄ´ DASoft ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ· ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ Copyright 1995 ³ DATE: 1995-10-01 ÇÄ· ³ ³ FILE NAME INTRNATS.TXT º by ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄ º º ³ ³ º Don Schullian, Jr. º º ³ ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º º ³ A license is hereby granted to the holder to use this source code in º º ³ any program, commercial or otherwise, without receiving the express º º ³ permission of the copyright holder and without paying any royalties, º º ³ as long as this code is not distributed in any compilable format. º º ³ IE: source code files, PowerBASIC Unit files, and printed listings º º ÔÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º ³ .................................... º ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ $endif '.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø ' ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø Several functions in this library provide international support. DOS, too, provides some of this support but stops VERY short of doing a complete job. If DOS supports the particular country you need, then it will provide you with all the information you need to use all these routines except the lower case conversion table. The only time you need to change the system's country code is if your program requires the use of fUCASEchar?, fUCASEdos$ or UCASEdos for ASCII codes > 127. If you do this, however, please don't forget to set it back to it's original settings before ending your program:) As all of these routines can be found on page 11 of the help menu and that most of them are very straight forward anyhow I will not go into lengthy explanations here. The only thing that MAY become confusing is the casing routines and how they work. Regardless of whose casing routines you use, PowerBASIC, DOS, or ours, the characters < CHR$(128) are considered standard ASCII and will always be treated the same. It is the last half of the ASCII set that changes with each country. PowerBASIC's UCASE$ and LCASE$ seem to be fixed to the 437(US) code page. DOS's UCASE routines seem to be fixed with whichever country the user has loaded at start-up. Our routines default to 437(US) to match PowerBASIC but can be changed at any time by sending a 128 character string with the "converted" letters in the position of the characters to be changed. The 3 strings below use the lower ASCII values to demonstrate how Upper$ and Lower$ need to be built before calling SetUpperCase and SetLowerCase. Of course the real thing will start with CHR$(128) and proceed through CHR$(255). ASCII="789;:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz" U$ ="789;:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ" L$ ="789;:<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz" fSetCountry% ÚÄ DOS support fGetCountry$ CountryCodeTYPE ³ fGetCollate$ fGetUCASE$ ³ fUCASEchar? fUCASEdos$ UCASEdos ³ 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ pbvUsingChrs ÃÄ PowerBASIC 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ SetUpperCase fUCASE$ UCASEstr ³ SetLowerCase fLCASE$ LCASEstr ³ SetMoneyMask fMoney$ ³ SetDateFormat all DASsoft date$ routines ³ SetTimeFormat all DASsoft time$ routines ÀÄ DASoft routines It is NOT mandatory that your programs conform to DOS's idea of which countries are to be supported! Many countries that are NOT supported by DOS and the code pages have their own routines that load their characters, key- board drivers, code pages, etc. By building a small data-base of this info or by allowing your users the opportunity to make their own choices your programs can service almost everyone, everywhere! '.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø ' ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø '.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø ' ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø Try this code at the top of your programs: PUBLIC pCollate$ ' so it can be used everywhere SetupCCstuff SUB SetupCCstuff () LOCAL PUBLIC LOCAL U$ DIM tCC AS CountryCodeTYPE LSET tCC = fGetCountry$( 0 ) ' current setting U$ = fGetUCASE$ ' DOS's ucase 128 chars pCollate$ = fGetCollate$ ' DOS's collate 256 chars MID$( pbvUsingChrs, 3, 2 ) = CHR$(tCC.ThousandSep, tCC.DecimalSep) SetDateFormat tCC.DateFormat , tCC.DateSep SetTimeFormat tCC.TimeFormat , tCC.TimeSep SetMoneyMask tCC.MoneySymbol, tCC.MoneyFormat, tCC.MoneyDecs SetUpperCase U$ END SUB '.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø ' ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø PowerBASIC does provide an easy way to UCASE and/or LCASE a string. pLower$ = "abcdefghijklmnopqrstuvwxyz" ' public variables pUpper$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ' REPLACE ANY pLower$ WITH pUpper$ IN Txt$ ' ucase REPLACE ANY pUpper$ WITH pLower$ IN Txt$ ' lcase