UNICODEFILESYSTEMBOM (FTP client and server) statement
文章推薦指數: 80 %
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
延伸文章資訊
- 1What's the difference between UTF-8 and UTF-8 with BOM?
The UTF-8 BOM is a sequence of bytes at the start of a text stream ( 0xEF, 0xBB, 0xBF ) that allo...
- 2位元組順序記號 - 维基百科
位元組順序記號(英語:byte-order mark,BOM)是位於碼點 U+FEFF 的統一碼字符的名称。當以UTF-16或UTF-32來將UCS/統一碼字符所組成的字串編碼時,這個字符被用來...
- 3The byte-order mark (BOM) in HTML - W3C
For example, if you use Save As in Dreamweaver and your file has a BOM at the start you will see ...
- 4FAQ - UTF-8, UTF-16, UTF-32 & BOM - Unicode
Therefore, it works well in any environment where ASCII characters have a significance as syntax ...
- 5unicode-bom - ESLint - Pluggable JavaScript Linter
The Unicode Byte Order Mark (BOM) is used to specify whether code units are big endian or little ...