UNICODEFILESYSTEMBOM (FTP client and server) statement

文章推薦指數: 80 %
投票人數:10人

Restriction: UTF-8 and UTF-16 are the only Unicode encodings supported in the file system by z/OS® FTP. Result: The BOM stored with the file is determined ... UNICODEFILESYSTEMBOM(FTPclientandserver)statement UsetheUNICODEFILESYSTEMBOMstatementtospecifywhethertoaddabyteordermark(BOM)toa filestoredinthelocalfilesystemwhenthefilesystemcodepageisUnicode.Youcanalsousethe SIteandLOCSItesubcommandstosetthiskeyword. Restriction:UTF-8andUTF-16aretheonlyUnicodeencodingssupportedinthefilesystem byz/OS®FTP. Result:TheBOMstoredwiththefileisdeterminedbytheencodingusedtostorethefile ratherthanbytheformatoftheBOMsentwiththefile. Server ThissettingapplieswhenyouarestoringUnicodedataintotheserver'sfilesystem. Client ThissettingapplieswhenyouarestoringfilesasUnicodeontheclient'sfilesystem. SyntaxUNICODEFILESYTEMBOMASISUNICODEFILESYTEMBOMASISALWAYSNEVER Parameters ASIS IfaBOMkispresentinaUnicodefilethatisreceivedfromthe network,storethefilewithaBOM.IfaBOMisnotpresent,store thefilewithoutaBOM.ThedefaultisASIS. ALWAYS AlwaysincludeaBOMwhenstoringthefile.Ifthefileisreceived withoutaBOM,insertaBOMintothefile. NEVER NeverincludeaBOMwhenstoringaUNICODEfile.Ifthefile isreceivedwithaBOM,discarditbeforestoringthefile.The UNICODEBOM,U+FEFF,canalsobeinterpretedaszerowidthnonbreaking space.z/OSFTP considersonlythefirstcharacterofthefileasapossibleBOM. NootherinstanceoftheBOMsequenceinthefileisaffectedby thissetting. Results: Whenappendingtoanonexistentregularz/OSUNIXfileorMVS™dataset,theFTPserverabidesbytheUNICODEFILESYTEMBOM setting. Whenappendingtoanexistingregularz/OSUNIXfileorMVSdataset,theFTPserveralwaysstripsa leadingBOMfromtheincomingfile.ThispreventsasuperfluousBOM frombeinginsertedinthemiddleoftheserverfile. Whenstoringorappendingtoaz/OSUNIXnamedpipe,theFTPserver alwaysappliestheUNICODEFILESYSTEMBOMsetting.Multipletransfers intothesamenamedpipecanresultinmultipleBOMbytesequences insertedintothenamedpipe. Guidelines: ThepresenceorabsenceofaBOMcanaffectapplicationsthat processUNICODEfiles.Consultdocumentationforapplicationsthat processyourfilesordatasets. DonotuseaBOMwhenstoringUNIXsystemservicesconfigurationfiles. Multipletransfersintoaz/OSUNIXnamedpipecanresultinmultiple BOMbytesequencesbeinginsertedintothenamedpipewhentheUNICODEFILESYSTEMBOM valueisASISorALWAYS.TopreventsuperfluousBOMbytesequences frombeinginsertedinanamedpipe,considersettingtheUNICODEFILESYSTEMBOM valuetoNEVERafterthefirsttransferintothenamedpipe. ExamplesTotransferaUTF-8filetothe server,saveitintheserverfilesystemasUTF-8,andtoguarantee thedestinationfilecontainsaByteOrderMark,codethefollowing statementsintheserver'sFTP.DATA: ENCODINGMBCS MBDATACONN(UTF-8,UTF-8) UNICODEFILESYSTEMBOMALWAYS Relatedtopics MBDATACONN(FTPclientandserver)statement UNIXFILETYPE(FTPclientandserver)statement Parenttopic:FileTransferProtocol



請為這篇文章評分?