资源描述:
《delphi unicode migration》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、TechNotesDelphiUnicodeMigrationforMereMortals:StoriesandAdvicefromtheFrontLinesCaryJensen,JensenDataSystems,Inc.December2009CorporateHeadquartersEMEAHeadquartersAsia-PacificHeadquarters100CaliforniaStreet,12thFloorYorkHouseL7.313LaTrobeStreetSanFranci
2、sco,California9411118YorkRoadMelbourneVIC3000Maidenhead,BerkshireAustraliaSL61SF,UnitedKingdomDelphiUnicodeMigrationforMereMortals:StoriesandAdvicefromtheFrontLinesSUMMARY®WiththereleaseofEmbarcaderoRADStudio2010(andbeginningwiththereleaseofRAD®®Studi
3、o2009),EmbarcaderoTechnologieshasempoweredyou,theDelphiandC++Builderdeveloper,todeliverfirstclass,Unicode-enabledapplicationstoyourcustomers.Whilethisimportantdevelopmentisopeningnewmarketsforyoursoftware,insomecasesitpresentsachallengeforexistingappl
4、icationsanddevelopmenttechniques,especiallywherecodehasincludedassumptionsaboutthesizeofstrings.ThispaperaimstoguideyourUnicodemigrationeffortsbysharingtheexperiencesandinsightsofnumerousDelphideveloperswhohavealreadymadethejourney.Itbeginswithagenera
5、lintroductionoftheissues,followedbyabriefoverviewofUnicodebasics.Thisisfollowedbyasystematiclookatthevariousaspectsofyourapplicationsthatmayrequireattention,withexamplesandsuggestionsbasedonrealworldexperience.AlistofreferencesthatmayaidyourUnicodemig
6、rationeffortscanbefoundattheendofthispaper.INTRODUCTIONEmbarcaderointroducedfullUnicodesupportinRADStudioforthefirsttimeinAugustof2008.Indoingso,theyensuredthatDelphiandC++BuilderwouldremainattheforefrontofnativeapplicationdevelopmentontheWindowsplatf
7、ormforaverylongtimetocome.However,unlikemanyoftheothermajorenhancementsthathavebeenintroducedinDelphiovertheyears,suchasvariantsandinterfaces(Delphi3),frames(Delphi5),functioninliningandnestedclasses(Delphi2005)andgenerics(RADStudio2009),enablingUnico
8、dedidn'tinvolvesimplyaddingnewfeaturestowhatwasalreadysupportedinDelphi.Instead,itinvolvedaradicalchangetoseveralfundamentaldatatypesthatappearinnearlyeveryDelphiapplication.Specifically,thedefinitionsfortheString,Char,andPChartypeschanged.The