On Fri, Apr 20, 2001 at 08:32:23PM +0100, Maurice Bauhahn wrote: | I'm trying to create a dictionary in jython where the key is an | individual character (one byte). Because of the difficulty of entering | each such character (especially the upper-ASCII ones or eventually | Unicode ones), it seems appropriate to have Jython convert a decimal or | hexadecimal number to a character. However whenever the chr() function | encounters a number above 127 the result is as follows: | >>> chr(127) | '?' (in fact a character like a house) | >>>chr(233) | '\351' | Any suggestions on how to get around this? I think that is a result of your terminal/display. >>> chr( 127 ) '¦' # heh, nice cut-n-paste, it looks more like the "delta" symbol (triangle) >>> chr( 233 ) '\351' >>> ord( chr( 233 ) ) 233 >>> oct( ord( chr( 233 ) ) ) '0351' I don't think it is a problem with the functionality. -D
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4