Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
there is no str.isspecial()
#10
(Oct-05-2017, 12:37 AM)Larz60+ Wrote: Don't forget multiple byte codes, utf-16le, utf-32 etc
i didn't forget they exist.

does python3 use them for string types?  the bytes types are apparently 8-bit and thus utf-8.  the string type has to be using something or have some means that lets it abstract a wide range of numerical values.  i wrote this code that lets users work with these values numerically at the command line.  it takes a numeric value for one character per argument and outputs the utf-8 sequence.  i wrote it so i could output specific unicode in shell scripts (i can already do this in python).  it includes a function named intx() that accepts numeric values in many base prefixes (like '0y' for base 32, ':' for base 36, '0t' for base 3, '0q' for base 4) that is used to encode digits from each argument.  try this command to test it, if you have Linux.
python3 utf8.py 67 111 112 121 114 105 103 104 116 32 169 32 0x4c 0x61 :36 :3e 43 54 48 10
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
there is no str.isspecial() - by Skaperen - Oct-02-2017, 12:08 AM
RE: there is no str.isspecial() - by metulburr - Oct-02-2017, 02:30 AM
RE: there is no str.isspecial() - by Skaperen - Oct-02-2017, 06:54 AM
RE: there is no str.isspecial() - by nilamo - Oct-04-2017, 04:34 PM
RE: there is no str.isspecial() - by DeaD_EyE - Oct-04-2017, 07:13 PM
RE: there is no str.isspecial() - by Skaperen - Oct-05-2017, 12:33 AM
RE: there is no str.isspecial() - by Larz60+ - Oct-05-2017, 12:37 AM
RE: there is no str.isspecial() - by Skaperen - Oct-05-2017, 04:08 AM
RE: there is no str.isspecial() - by sparkz_alot - Oct-05-2017, 12:44 AM
RE: there is no str.isspecial() - by Skaperen - Oct-05-2017, 02:26 AM
RE: there is no str.isspecial() - by Larz60+ - Oct-05-2017, 09:07 AM
RE: there is no str.isspecial() - by sparkz_alot - Oct-05-2017, 02:08 PM
RE: there is no str.isspecial() - by Skaperen - Oct-07-2017, 03:20 AM
RE: there is no str.isspecial() - by ichabod801 - Oct-07-2017, 03:25 AM
RE: there is no str.isspecial() - by Skaperen - Oct-08-2017, 03:08 AM

Forum Jump:

User Panel Messages

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