Ir para conteúdo
Postado
  • Fundador

Como definir a codificação padrão para UTF-8 para o Bloco de Notas


Baixe o arquivo VBScript.zip;  Extraia no Disco Local C:\; Abra a pasta VBScript; Execute SetDefaultUTF8Encoding.vbs; Ele vai pedir para executar como administrador, ACEITE!; Depois disso crie um bloco de notas na área de trabalho; Com o bloco de notas aberto, na aba "Arquivo", clique em "Salvar como..." Veja se o padrão está em UTF-8 O script usado é esse: ' elevate privilege to execute the code If Not WScript.Arguments.Named.Exists("elevate") Then CreateObject("Shell.Application").ShellExecute WScript.FullName _ , """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1 WScript.Quit End If strNotePadKeyPath = "HKEY_CLASSES_ROOT\.txt\ShellNew" strFileNameKey = "FileName" strNotePadTemplatePath = "TXTUTF-8.txt" Set WshShell = CreateObject("WScript.Shell") ' set registry key WshShell.RegWrite strNotePadKeyPath & "\" & strFileNameKey, strNotePadTemplatePath, "REG_SZ" ' get win dir windir = WshShell.ExpandEnvironmentStrings("%windir%") Set WshShell = Nothing targetTemplatepath = windir & "\ShellNew\" & strNotePadTemplatePath Set fso = CreateObject("Scripting.FileSystemObject") ' get folder containing current script Set scriptFile = fso.GetFile(Wscript.ScriptFullName) strFolder = fso.GetParentFoldername(scriptFile) ' copy template file to target folder fso.CopyFile strFolder & "\" & strNotePadTemplatePath, targetTemplatepath, True Set fso = Nothing Wscript.echo "Done"   Caso de algum erro, não se preocupe, faça apenas mais uma coisa, va na pasta C:\Windows\ e crie uma pasta nova chamada SHELLNEW entre na pasta C:\Windows\SHELLNEW e copie o arquivo "TXTUTF-8.txt" pra ela, depois disso deve funcionar normalmente!

 

multicolours1.gif

#MakeGGamesGreatAgain

  • Visualizações 2,1k
  • Criado
  • Última resposta

Featured Replies