Out-File -encoding problems - TechNet - Microsoft
文章推薦指數: 80 %
I have written one of my first PowerShell scripts to execute after I mirror my ... other than to rename my original files to ANSI format?
TechNet
Products
ITResources
Downloads
Training
Support
Products
Windows
WindowsServer
SystemCenter
MicrosoftEdge
Office
Office365
ExchangeServer
SQLServer
SharePointProducts
SkypeforBusiness
Seeallproducts»
Resources
Channel9Video
EvaluationCenter
LearningResources
MicrosoftTechCompanionApp
MicrosoftTechnicalCommunities
MicrosoftVirtualAcademy
ScriptCenter
ServerandToolsBlogs
TechNetBlogs
TechNetFlashNewsletter
TechNetGallery
TechNetLibrary
TechNetMagazine
TechNetWiki
WindowsSysinternals
VirtualLabs
Solutions
Networking
CloudandDatacenter
Security
Virtualization
Updates
ServicePacks
SecurityBulletins
WindowsUpdate
Trials
WindowsServer2016
SystemCenter2016
Windows10Enterprise
SQLServer2016
Seealltrials»
RelatedSites
MicrosoftDownloadCenter
MicrosoftEvaluationCenter
Drivers
WindowsSysinternals
TechNetGallery
Training
Expert-led,virtualclasses
TrainingCatalog
ClassLocator
MicrosoftVirtualAcademy
FreeWindowsServer2012courses
FreeWindows8courses
SQLServertraining
MicrosoftOfficialCoursesOn-Demand
Certifications
Certificationoverview
Specialoffers
MCSECloudPlatformandInfrastructure
MCSE:Mobility
MCSE:DataManagementandAnalytics
MCSEProductivity
Otherresources
MicrosoftEvents
ExamReplay
BornToLearnblog
Findtechnicalcommunitiesinyourarea
Azuretraining
OfficialPracticeTests
Supportoptions
Forbusiness
Fordevelopers
ForITprofessionals
Fortechnicalsupport
Supportofferings
Moresupport
MicrosoftPremierOnline
TechNetForums
MSDNForums
SecurityBulletins&Advisories
NotanITpro?
MicrosoftCustomerSupport
MicrosoftCommunityForums
ThisforumhasmigratedtoMicrosoftQ&A.VisitMicrosoftQ&Atopostnewquestions.
LearnMore
WindowsServerTechCenter
Signin
UnitedStates(English)
Brasil(Português)Česko(Čeština)Deutschland(Deutsch)España(Español)France(Français)Indonesia(Bahasa)Italia(Italiano)România(Română)Türkiye(Türkçe)Россия(Русский)ישראל(עברית)المملكةالعربيةالسعودية(العربية)ไทย(ไทย)대한민국(한국어)中国(中文)台灣(中文)日本(日本語)
HomeWindowsServer2012WindowsServer2008R2WindowsServer2003LibraryForums
Askaquestion
Quickaccess
Forumshome
Browseforumsusers
FAQ
Searchrelatedthreads
RemoveFromMyForums
Askedby:
Out-File-encodingproblems
ArchivedForums901-920
>
WindowsPowerShell
Question
0
Signintovote
IhavewrittenoneofmyfirstPowerShellscriptstoexecuteafterImirrormymusiccollectiontobackitup. ThePSscriptIwrotewillreplaceastringoftextusingthe"-replace"command. However,whentheoutfileiswritten,theoriginal
encodingislost. Forinstance,thefollowinglineisthesource:
延伸文章資訊
- 1File encoding - Mastering Windows PowerShell Scripting
File encoding Windows editors, including ISE, tend to save files using what is commonly known as ...
- 2PowerShell 輸出結果編碼問題 - 黑暗執行緒
Do-Something.ps1 > output.txt 存檔是用ANSI/BIG5 編碼,但事實不然。 ... 其編碼Export-PSSession 用UTF8(含BOM) New-Ite...
- 3PowerShell Convert a File from utf-8 to ANSI (such as ...
(PowerShell) Convert a File from utf-8 to ANSI (such as Windows-1252). This example is to satisfy...
- 4How to convert multiple files encoded in UTF-8-BOM to ANSI?
I would like the output to be correct in both cases. If Powershell it's not the solution, what el...
- 5How to save command output to file using Command Prompt or ...