![]() |
||
|
New Member
加入日期: Sep 2015
文章: 7
|
Notepad 存utf8的解決方案
Notepad 存utf8時會在檔案前面加3個 byte的 bom
用android studio 寫java時很困擾 的破解 系統 windows 10 64 bit takeown /f notepad.exe icacls notepad.exe /grant everyone:F 32 bit C:\Windows\sysWOW64\notepad.exe 207,872 Bytes 6660 : 00 00 83 E8 01 0F 84 9E-00 00 00 83 E8 01 75 1E 6660 : — — — — — — — — — — — — — — EB — 64 bit C:\Windows\system32\notepad.exe 215,040 Bytes 3FA0 : 83 F9 01 75 2B 3FA0 : — — — EB — |
|||||||
|
|
|
Master Member
![]() ![]() ![]() ![]() 加入日期: Jan 2002 您的住址: U.S.S AGC
文章: 1,669
|
UNICODE格式的檔頭通常是2BYTES(UTF-32則是4BYTES) : FF FE。
如果你要不帶有BOM標記的,唯一方法只能存"生的UTF-16",讀取程式就直接以UTF-16方式(也就是每次以2BYTES取字)讀檔處理了。 生的UTF-16,可以以下BAT命令創出。 CMD /U /C DIR /S D:*.* > %DATE%-HD_D_LIST.TXT
__________________
辭源數位化計劃啟始於2014年1月。請拜訪成果。 此文章於 2016-10-16 10:18 AM 被 asccpu 編輯. |
||
|
|
|
Power Member
![]() ![]() 加入日期: Jan 2002 您的住址: Taipei
文章: 664
|
改執行檔不是好方法... 不小心更新到就要再改一次.
直接找個能自行決定要不要產生 BOM 的 editor 比較快, 然後加個 registry 直接取代系統的 notepad.exe 代碼:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe] "Debugger"="\"C:\\Editor\\notepad.exe\"" 只要系統要執行 notepad.exe 就會執行所指定的執行檔.
__________________
Tommy 碎碎念... |
|
|
|
Major Member
![]() 加入日期: Dec 2004
文章: 209
|
請愛用 notepad++
開大檔速度也是首屈一指的 |
|
|