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
延伸文章資訊
- 1convert all .txt files in a folder from ibm-850 unicode utf-8
Option Explicit 'Batch Convert of ibm-850 files to unicode utf-8 with BOM header Dim FS, Folder, ...
- 2Convert multiple files to UTF-8 encoding with Notepad++
This file will search all files and folders within a given directory, and use Notepad++ to conver...
- 3Batch convert encoding in files - Super User
UTFCast is a Unicode converter that lets you batch convert all text files to UTF encodings with j...
- 4How do you batch convert UTF-16 to UTF-8? - PTC Community
So, I have attempted to create a Windows Command Line batch file to open Arbortext Editor and exe...
- 5Notepad++ - 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...