May-21-2018, 03:46 AM
(May-21-2018, 03:06 AM)wavic Wrote:Quote:so how does this convert to utf8?>>> chr(int('0x42f', 16)) 'Я'
what non-python tool does it use to do such conversion?
what program is this being run under? out of speculation, i tried running this under python3.5.2 but did not get the same results:
Output:lt1/forums /home/forums 11> python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> chr(int('0x42f', 16))
'\u042f'
>>>
lt1/forums /home/forums 12>
i am going to be running this to verify if i am getting the correct conversion in python. ideally this would be a command that has the actual conversion code in it. so there woul e some form of bit operations or the arithmetic equivalent (*2 is like a left shift of 1)
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.