Python Forum
get original code after being encoded to UTF-8
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get original code after being encoded to UTF-8
There you go then. Something is storing the file as a binary, rather than text. How are you creating the file and saving it?
i have created the file by Geany editor in raspbian and i save it with .py extension.
when i opened it in windows i get encrypted file.
try utf-16
utf-16 does nt work.
i have tried a lot of encoding format but none of them work.
(Sep-07-2020, 09:53 AM)ashok Wrote: i have created the file by Geany editor in raspbian and i save it with .py extension.

Something is wrong on the Linux side then because file shouldn't be saying the file is "data". I haven't used Geany, but I'd be surprised if a text editor is doing that.
As mention something most be wrong on the Linux side,i can use eg Geany in both Mint or Kail.
Have choose Python as Scripting language in editor,all other setting default in Geany(encoding default is utf-8).
No problem when move file .py to Windows,just a normal Python file no encryption/encoding stuff going on.
i think there's no solution for this.
So, how can i avoid my code get encrypted ?
Did you create this file?
If so, perhaps show how you created it.
Plus, I doubt the file is being encrypted. I don't know what you're doing to end up with a binary, but encryption is likely not it.

Possibly Related Threads…
Thread Author Replies Views Last Post
  filecmp is not working for UTF-8 BOM encoded files sureshnagarajan 3 574 Feb-10-2021, 11:17 AM
Last Post: sureshnagarajan
  HELP! i need the solution to show for original indexing bntayfur 1 575 Oct-02-2020, 06:44 PM
Last Post: buran
  Why is my original list also sorted? Pedroski55 1 561 Jul-15-2020, 09:25 PM
Last Post: Yoriz
  Trouble with encoded data (I think) fishglue 0 677 Oct-10-2019, 08:15 PM
Last Post: fishglue
  can python generate lists in blocks that can be removed from the original output? teknalchemist 0 1,219 May-22-2018, 06:10 PM
Last Post: teknalchemist
  convert hex encoded string to ASCII Skaperen 4 94,995 Oct-02-2016, 09:22 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020