Thursday, April 16, 2015

Error Encoding with Python 3 on Windows Command Prompt


Error Encoding with Python 3 on Windows Command Prompt
Environment: MS Windows 7 / Python 3.4



I have do some script with Python 3, but the output is always contains some weird character, looks like error encoding, Python 3 is using unicode by default, Finally, I found that the problem is come from the Command Prompt, you must configure the code page of command prompt to ensure which is running with unicode.


Method to change the code page:
<command prompt>
#chcp 65001
then right click, <command prompt> , <properties> , change the font to something other than Raster
it will turn command prompt to using unicode UTF-8, the setting will be save once your run the command.

Thanks for watching

Wednesday, March 18, 2015

Clear Map Drive User Login Cache


Clear Map Drive User Login Cache
Environment: Windows 7


You may experienced that you tried to mapping network drive resource with different credentials, but, the connection has not been closed properly, then, you try to clear the drive mapping by Command Prompt like
#net use <Something> /delete


But no luck. Actually, Windows may memorized the credential and cannot clear by restart or re-login.
You need to clear it by yourself as shown below

Control Panel





On the left hand side
 


then, You will see a list of Windows Credentials, just delete at your will.