How do you batch convert UTF-16 to UTF-8? - PTC Community
文章推薦指數: 80 %
So, I have attempted to create a Windows Command Line batch file to open Arbortext Editor and execute the command on the files in a local ... MENU Search LogIn cancel Turnonsuggestions Auto-suggesthelpsyouquicklynarrowdownyoursearchresultsbysuggestingpossiblematchesasyoutype. Showingresultsfor Searchinsteadfor Didyoumean: AllcommunityThiscategoryThisboardKnowledgeUsers cancel Turnonsuggestions Auto-suggesthelpsyouquicklynarrowdownyoursearchresultsbysuggestingpossiblematchesasyoutype. Showingresultsfor Searchinsteadfor Didyoumean: CloseX Community Arbortext Arbortext HowdoyoubatchconvertUTF-16toUTF-8? Options SubscribetoRSSFeed MarkTopicasNew MarkTopicasRead FloatthisTopicforCurrentUser Bookmark Subscribe Mute PrinterFriendlyPage HowdoyoubatchconvertUTF-16toUTF-8? Green12 3-Visitor Nov29,2018 09:24AM MarkasNew Bookmark Subscribe Mute SubscribetoRSSFeed Permalink Print EmailtoaFriend NotifyModerator Nov29,2018 09:24AM HowdoyoubatchconvertUTF-16toUTF-8? Hi,IhavealotoffilesthatIhaveexportedfromtheAADCSDBandIwanttoconverttheminbulkfromUTF-16toUTF-8.IamfamiliarwiththefollowingACL: save_as-encodingutf-8myfilename.xmlThisworksbutistoolaborioustorepeatforeveryfile.So,IhaveattemptedtocreateaWindowsCommandLinebatchfiletoopenArbortextEditorandexecutethecommandonthefilesinalocaldirectoryusingthe-cswitch.AtthemomentIgetnothingoutofit.Thescriptdoesnotopenadialogandasktosavethefile.Iwouldprefertomerelyreplacethecurrentfile.Doesanyonehaveasuggestionastohowthescriptmightbeimprovedinordertoprocessmultiplefiles? :REMconvertallfilesindirectoryfromUTF-16toUTF-8 ECHO********************* ECHOCONVERTUTF16TOUTF8 ECHO********************* for%%fin(*.xml)do("C:\ProgramFiles(x86)\PTC\ArbortextEditor\bin\x86\editor.exe"-c"save_as-encodingutf-8"%%f) ECHO********************* ECHODONE ECHO********************* Labels: Labels: Aerospace&Defense 0 Kudos Reply NotifyModerator Allforumtopics PreviousTopic NextTopic 2REPLIES2 GarethOakes 15-Moonstone (To:Green12) Nov29,2018 04:19PM MarkasNew Bookmark Subscribe Mute SubscribetoRSSFeed Permalink Print EmailtoaFriend NotifyModerator Nov29,2018 04:19PM StartwithasimplerbatchfilethatjustprintsouttheXMLnamesonscreenthenbuilditupfromthere.Yoursyntaxlooksprettyclosetocorrectsothereisprobablynotmuchwrong.OnethingIwoulddoisdouble-quotethefinal%%fvariableasWindowscommandlinewon'tprocessfilescontainingspacesotherwise. 0 Kudos Reply NotifyModerator Green12 3-Visitor (To:GarethOakes) Dec03,2018 08:14AM MarkasNew Bookmark Subscribe Mute SubscribetoRSSFeed Permalink Print EmailtoaFriend NotifyModerator Dec03,2018 08:14AM Thankyoufortakingthetimetoreply.I'llrewritethis.By thewayAdobeCS4DreamweaverwillalsosavefilestoUTF-8. OpenthefilewithDreamweaver,fromthemenuselect:Modify/PageProperties,fromthedialogboxselectDocumentEncoding:usingthedropdownmenuchooseUnicode(UTF-8), ClickOK FromthemenuchooseFile/Save. Closethefile. UTF-8usuallycutsthefilesizeinhalf,approximately.Ihavenoideahowreliablethisis. 0 Kudos Reply NotifyModerator PostReply Announcements About PTC.com Products&Solutions Contact Resources MyPTC-Support PTCUniversity HelpCenter-ProductGuides ProductDocumentation SuccessPaths-Planning&ImplementationGuides OtherPTCCommunities OnShape RealityLab VuforiaEngine PTCuser TermsofService LegalPolicies facebook twitter linkedin youtube
延伸文章資訊
- 1convert2utf - PyPI
***Batch mode***: Pass in a directory as the input, and all text files that meets the criteria un...
- 2Batch convert encoding in files - Super User
UTFCast is a Unicode converter that lets you batch convert all text files to UTF encodings with j...
- 3How to convert 200 target files to UTF 8 in one operation ...
I have a project of about 200 files. The files are encoded in UTF 7. How to convert 200 target fi...
- 4Notepad++ - Batch convert ANSI GB2312 files to UTF8
Copy the files you want to convert to F:\temp\UTF8. (You may change your path in your script); In...
- 5How To Batch Convert Text Files To UTF-8 Encoding
UTFCast is a small tool for Windows that lets you batch convert all text files to UTF-8 encoding....