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
#11
There you go then. Something is storing the file as a binary, rather than text. How are you creating the file and saving it?
Reply
#12
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.
Reply
#13
try utf-16
Reply
#14
utf-16 does nt work.
i have tried a lot of encoding format but none of them work.
Reply
#15
(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.
Reply
#16
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.
Reply
#17
i think there's no solution for this.
So, how can i avoid my code get encrypted ?
Reply
#18
Did you create this file?
If so, perhaps show how you created it.
Reply
#19
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Can you put encoded strings into .txt files? Alivegamer 0 1,243 May-04-2022, 12:50 AM
Last Post: Alivegamer
  Looping through nested elements and updating the original list Alex_James 3 2,070 Aug-19-2021, 12:05 PM
Last Post: Alex_James
  filecmp is not working for UTF-8 BOM encoded files sureshnagarajan 3 2,556 Feb-10-2021, 11:17 AM
Last Post: sureshnagarajan
  HELP! i need the solution to show for original indexing bntayfur 1 1,487 Oct-02-2020, 06:44 PM
Last Post: buran
  Why is my original list also sorted? Pedroski55 1 1,581 Jul-15-2020, 09:25 PM
Last Post: Yoriz
  Trouble with encoded data (I think) fishglue 0 1,763 Oct-10-2019, 08:15 PM
Last Post: fishglue
  convert hex encoded string to ASCII Skaperen 4 113,933 Oct-02-2016, 09:22 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

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