Can't save the file after change the Encoding from "Characters ...

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

So, I change the encodind of a file to UTF-8 by going to: Menu -> Encoding -> Utf-8 -> SAVE After saving the file, I close it an open it. Can'tsavethefileafterchangetheEncodingfrom"CharactersSets"toUTF-8 Helpwanted···–––··· 3 6 438 LoadingMorePosts OldesttoNewest NewesttoOldest MostVotes Reply Replyastopic Logintoreply Thistopichasbeendeleted.Onlyuserswithtopicmanagementprivilegescanseeit. HellenaCrainicu lasteditedbyHellenaCrainicu hello.IwanttochangethehtmlfiletoUTF-8. So,IchangetheencodindofafiletoUTF-8bygoingto: Menu->Encoding->Utf-8->SAVE Aftersavingthefile,Icloseitanopenit.So,Idiscoverthesame“CharacterSets”asthedefaultEncoding.whyhasn’titchangedifisavedasuft-8? 1Reply Lastreply Reply Quote 0 HellenaCrainicu @HellenaCrainicu lasteditedby Ialsodisablethatfeature(Settings>Preferences…>MISC>Autodetectcharacterencoding). Istillhavethesameproblem… 1Reply Lastreply Reply Quote 0 PeterJones @HellenaCrainicu lasteditedbyPeterJones @hellena-crainicu, Ifyoudon’thaveanycharactersthatareoutsideofstandardASCII(Icannotseeanyinyourscreenshot),thenNotepad++seesonlybytesfrom0-127,soit’sperfectlyhappypicking8859-1,whichisASCII-compatible.Evenwithauto-detectoff,ithastomakesomedecisionregardingwhatencodingisactuallyused.Youmightdisagreewiththatdecision. Inthatcase,ifyoulookinSettings>Preferences>NewDocument,youwillfindthatyoucansetthedefaultencodingtoUTF8aswellastellNotepad++toapplythattoANSIfiles(soifitseesonly0-127,itrecognizesitasANSI,andthenwhenyouopenit,Notepad++willautomaticallytreatthat0-127-onlyfileasUTF8instead). 1Reply Lastreply Reply Quote 0 PeterJones @PeterJones lasteditedby PS:Iknowsomeheredisagreewithme,butthat’swhyIlikeUTF-8-with-BOM:itdisambiguatesthefile,andallowseditorsandtoolstoknowthatyoureallymeantthatfiletobeUTF-8,andnotsomeother8-bitcharacterset.WithaBOMinyourfile,Notepad++willcorrectlytreatyourfileasUTF-8everytime. Iunderstandtheargumentthat“BOM”literallymeans“ByteOrderMark”,andUTF-8doesn’thaveavariablebyteorder,soitisnotneeded.ButIthinktheyshouldhavedefinedUTF-8withanidentifiersequenceofsomesort(atleastanoptionalone)whentheydefinedUTF-8,andthinkit’sagoodthingthattheunnecessaryBOMhasbeendual-purposedtosignifyunambiguouslyaUTF-8fileinmodernusage,evenifitwasn’tpartoftheoriginalpurposefortheBOM. 1Reply Lastreply Reply Quote 1 gstavi @PeterJones lasteditedby @peterjones: PS:Iknowsomeheredisagreewithme Asthechairmanofthe“hintedsome”.IhavenoobjectiontoBOM,Iobjectedtosomeonewhosaid“UTF8withoutBOMisstupid”.Itisnot! AndstilltherightsolutionisforNotepad++toreworkitsEncodingselectionandlettheuserhavemorecontrol.Thedefaultshouldbesomethinglike“alwaysassumeafileisUTF8unlessitviolatesUTF8rules,onlythenautodetect”. 1Reply Lastreply Reply Quote 2 PeterJones @gstavi lasteditedby @gstavisaidinCan'tsavethefileafterchangetheEncodingfrom"CharactersSets"toUTF-8: Iobjectedtosomeonewhosaid“UTF8withoutBOMisstupid”.Itisnot! Ihadeithermisrememberedormisreadthatoriginalanecdote.Sorryformisrepresentingwhathadbeensaidpreviously. AndstilltherightsolutionisforNotepad++toreworkitsEncodingselectionandlettheuserhavemorecontrol.Thedefaultshouldbesomethinglike“alwaysassumeafileisUTF8unlessitviolatesUTF8rules,onlythenautodetect”. 👍💯👏 1Reply Lastreply Reply Quote 0 Firstpost Lastpost Gotomynextpost × LookslikeyourconnectiontoCommunitywaslost,pleasewaitwhilewetrytoreconnect.



請為這篇文章評分?