Snippets tagged “ascii”
6 snippets use this tag.
- Alphabet range in PythonPython
In Python, you can use the string module's ascii_lowercase and ascii_uppercase constants to get the range of lowercase and uppercase letters in the ASCII character set respectively.
- Convert character to ASCII numeric value in javaJava
To convert a character to its ASCII numeric value in Java, you can use the charAt method of the String class and the intValue method of the Character class.
- How to convert ASCII code (0-255) to its corresponding character?Java
To convert an ASCII code (0-255) to its corresponding character in Java, you can use the char data type and cast the ASCII code to it.
- How to get the ASCII value of a characterPython
To get the ASCII value of a character in Python, you can use the built-in ord() function.
- How to increment letters like numbers in PHP?PHP
In PHP, you can use the ++ operator or the += operator to increment letters, just like you would with numbers.
- UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)Python
This error is raised when trying to encode a Unicode string using the ASCII codec, and the string contains a character that is not within the ASCII range (0-127).