Remove byte-order mark from the beginning of the file

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

Open the file in Visual Studio Code · Click the UTF-8 with BOM text at the bottom right of the screen · On the top select Save with Encoding Skiptocontent WhenafileissavedwithBOM(byte-ordermark)onaMacorLinuxmachineWindowsPowerShellcannotexecutethescript. Unfortunatelythe“cat”commanddoesnotshowthebyte-ordermarkatthebeginningofthefile.Someeditorsshowaquestionmarkatthebeginningofthefile. IhavediscovereditwhenIissuedthe“gitdiff”command: ToremovetheBOMinVisualStudioCode OpenthefileinVisualStudioCodeClicktheUTF-8withBOMtextatthebottomrightofthescreenOnthetopselectSavewithEncodingSelectUTF-8 The“gitdiff”commandshowstheremovaloftheBOM Postnavigation PreviousPostPreviouspost:ClearcookiesandsitedataofonesiteinChromeNextPostNextpost:MapthehostdriveinaVMwareFusionWindowsvirtualmachine Leaveacomment CancelreplyYouremailaddresswillnotbepublished.Requiredfieldsaremarked*Comment*Name* Email* Website Δ



請為這篇文章評分?