Python Forum
character code conversions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
character code conversions
#1
i am running into troubles with some character codes that are suppose to be ASCII or UTF-8 but they might be something else. i am sending the to another system which is rejecting them as invalid. i do not control either the source or the destination. so i want to analyze what i am getting and/or make some test conversions and/or make some test data. thus i need some tools to do this. one of the tools would take bytes and pretend they are UTF-8 and try to convert them, reporting if they are valid (and what they are) or invalid (and what is wrong). i may need to input these bytes in numeric form in octal, decimal, or hexadecimal. i may need to input them to STDIN or provide them in command line arguments.

should i look for such tools or write them?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
You have to know what the other system is expecting to get and provide a proper message. How do you have no control if you are sending these characters?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Forum Jump:

User Panel Messages

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