import os;
import sys;
filePathSrc="f:\\Temp\\UTF8"
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
if fn[-4:] != '.jar' and fn[-5:] != '.ear' and fn[-4:] != '.gif' and fn[-4:] != '.jpg' and fn[-5:] != '.jpeg' and fn[-4:] != '.xls' and fn[-4:] != '.GIF' and fn[-4:] != '.JPG' and fn[-5:] != '.JPEG' and fn[-4:] != '.XLS' and fn[-4:] != '.PNG' and fn[-4:] != '.png' and fn[-4:] != '.cab' and fn[-4:] != '.CAB' and fn[-4:] != '.ico':
notepad.open(root + "\\" + fn)
console.write(root + "\\" + fn + "\r\n")
#Does not work --> notepad.runMenuCommand("Encoding", "Character sets", "Chinese", "GB2312 (Simplified)")
notepad.menuCommand(MENUCOMMAND.FORMAT_GB2312)
# notepad.runMenuCommand("Encoding", "Convert to UTF-8-BOM")
notepad.menuCommand(MENUCOMMAND.FORMAT_CONV2_UTF_8)
# Reference: https://github.com/bruderstein/PythonScript/blob/master/PythonScript/src/NotepadPython.cpp
notepad.save()
notepad.close()
Right-click the Windows Start Menu. Choose Command Prompt (Admin).
If you don’t see Command Prompt listed, it’s because you have already been updated to a later version of Windows. If so, use this method instead to get to the Command Prompt:
Click the Start Button and type cmd
Right-click the result and select Run as administrator
Type this command and press ENTER: bcdedit /set {current} safeboot minimal
If this command does not work for you, try bcdedit /set safeboot minimal
Restart the computer and enter BIOS Setup (the key to press varies between systems).
Change the SATA Operation mode to AHCI from either IDE or RAID (again, the language varies).
Save changes and exit Setup and Windows will automatically boot to Safe Mode.
Right-click the Windows Start Menu once more. Choose Command Prompt (Admin).
Type this command and press ENTER: bcdedit /deletevalue {current} safeboot
If you had to try the alternate command above, you will likely need to do so here also: bcdedit /deletevalue safeboot
Reboot once more and Windows will automatically start with AHCI drivers enabled.