Can't save the file after change the Encoding from "Characters ...
文章推薦指數: 80 %
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.
延伸文章資訊
- 1How do I convert an ANSI encoded file to UTF-8 with ...
Try Settings -> Preferences -> New document -> Encoding -> choose UTF-8 without BOM, and check Ap...
- 2Can't save the file after change the Encoding from "Characters ...
So, I change the encodind of a file to UTF-8 by going to: Menu -> Encoding -> Utf-8 -> SAVE After...
- 3How do I save a Notepad file as UTF-8? - Ru-facts.com
Go to File > Save As… and choose UTF-8 under Encoding:, press Save and overwrite the existing fil...
- 4Wrong ANSI encoding for UTF-8 text file, when "Auto-detect ...
Even if I click in Notepad++ "Encoding - Convert to UTF-8" and save the file, then reopening will...
- 5Change the file encoding using Notepad++ - YouTube