how to detect/ remove 'UTF-8' code in python (window 10 console ) - python-3.x

saw some answers on this but not really useful
I do some coding with python using blender 2.6
and on occasion I copy text from internet page or from Libre office text document
so there might be some control characters UTF-8 copied to the text editor for python in blender
problem is I cannot detect where UTF-8 characters are located in blender text editor or even using outside text editor like notepad 2 or notepad ++
so my question is there a simple way to detect and remove these UNTF-8 characters ?
I mean on window 10 in blender using some python commands or using external text editor!
I need something quick or a simple trick here if possible!

sorry it is "utf-8"
in blender at least the error is given as "utf-8"
and very annoying
so when I run a script in bl with some unknown characters it gives an error
the problem is how can I find where it is and remove it !
The error in blender is given but does not always shows where it is located in the python script!
even if i had to use a text editor that can locate and then help to remove these characters somehow if possible at all

Related

python reverse unicode text into readable

i believe i have similar problem to this how to convert unicode text to utf8 text readable? but i want a python 3.7 solution to it
i am a complete newbie, i have some experience with python so i am trying to use it to make a script that will convert a Unicode file into the previous readable text it was.
the file is a bookmark file i have recovered using easeusa then i opened the bookmark file and it is writen in unicode something like "&PŽ¾³kÊ
k-7ÄÜÅe–?XBdyÃ8߯r×»Êã¥bÏñ ¥»X§ÈÕÀ¬Zé‚1öÄEdýŽ‹€†.c"
whereas previously is said something like " "checksum": "112d56adbd0caa2b3693bb0442dd16ff",
"roots": {
"bookmark_bar": {
"children":"
fyi when i click save as for the unicode bookmark file, for unicode it has ANSI and not utf-8 maybe it was saved us ANSI, i might be waffling here but i'm just trying to give you all the information you might need to help me
i am a newbie who depressingly need help
This text isn't "Unicode". It's simply gibberish.
This file has been corrupted -- it may have been overwritten with other data before you were able to recover it. It is unlikely to be recoverable.

UTF-8 BOM displaying symbols instead of text

Looks like this:
New to coding etc. and I'm trying to create a small mod for a game called Megaton Rainfall, I'm 90% sure the code I want to change/mod is in my scripts.fcm file but I can't figure out how to change it to readable text. I've switched the encoding to every different kind and it still remains unreadable. Please help if there is a way :) thanks!
Rather than opening in Notepad++ try opening in another text editor such as Vim, Sublime or Notepad. This should then be "readable text"

python console does not display ü

dear fellow developers,
I have tried to teach python console to display ü, but it insists with displaying ü instead. I have tried it with Python 3.5 and Python 3.6. The result is the same. If I run a .py file containing line print("ü") with F5 command, it displays
ü
instead of ü. If I type in the console
print ("ü")
it displays
ü
I know it has been discussed many times, but most of the methods I have come across during the last 5 hours have not helped me or I have not applied them properly. The problem exists also with other non ascii characters. I appreciate your help!
Try adding the following line on the top on your source file : # coding: utf-8
Also, check if your file encoding is correct (Always choose UTF-8).

Convert Text File From Unreadable Text to Readable Text

I'm trying to get this text file back to well readable text but I can't seem to find the encoding, it's for an Android application here is the one I'm trying to convert http://ge.tt/53SmHRP1/v/0
Can anyone point me in the right direction or give me a few tips on how to go about this as this is my first time with anything like this.
I've tried opening this with notepad, notepad++ & jedit to no avail the reason why I'm doing this is because I'm trying to create a cheat program for Plague Inc for Android but I can't seem to find the encoding for this file.

VB6 text appears as gibberish in one EXE but Hebrew in another

I have strange problem and minimal knowledge on VB6,
I got an EXE file that takes text (for button captions) from a text file.
This EXE which I don't has it code present all Hebrew text correctly.
I have build another EXE file (Identical to the previous) and all the functionally is working but it present all Hebrew as Gibberish!!
my text file encoding is Unicode.
Can you help me? Is there encoding for vb6 exe?
The default VB form/control fonts do not support all "foreign" characters.
If you set the font at runtime to "MS Shell Dlg" then Windows will translate this to the default UI font for that version of Windows which should handle most languages.
You'll also need to check the encoding of the file. If it's UTF-8 or a specific code page, then you'll need to use the MultibyteToWidechar() function to convert to UTF-16 for use in VB after reading it.
the perfect solution to resolve this issue is to change the font.Charset to 177 that represent HEBREW_CHARSET.
For example:
Text1.Font.Charset = 177
http://www.example-code.com/vb/vb6-display-unicode.asp

Resources