Question: I'm making a virtual machine in RPython using PyPy. My problem is, that I am converting each character into the numerical representation. For example, converting the letter "a" provides this result, 97. And then I convert the 97 to hex, so I get: 0x61.

So for example, I'm trying to convert the letter "á" into the hexadecimal representation which should be: 0xe1 but instead I get 0xc3 0xa1

Is there a specific encoding I need to use? Currently I'm using UTF-8.

--UPDATE--

Where instr is `"á"`, (including the quotes)

```
for char in instr:
    char = str(int(ord(char)))
    char = hex(int(char))
    char = char[2:]
    print char # Prints 22 C3 A1 22, 22 is each of the quotes
    # The desired output is 22 E1 22

```

Answer: 
From the code you have posted it should work so I can only assume it isn't including your scripts properly

If the acc folder is in the root folder of your website you should consider changing your scripts and css to:

```
<link rel="stylesheet" type="text/css" href="/acc/css/jquery-ui-style.css" />
<script type="text/javascript" src="/acc/js/jquery.js"></script>
<script type="text/javascript" src="/acc/js/jquery-ui.js"></script>
<script type="text/javascript" src="/acc/js/acc.js"></script>

```

Remove the dots - as that means you are trying to get to a folder one up from where you are (in the url, not the file with the html).

If this doesn't work then press f12 and check your console, you may have other js errors stopping the the accordion working
Sounds like you unchecked the JqueryUI Core, download the standard version of JqueryUI and overwrite the version created.

A [fiddle](http://jsfiddle.net/s5EV4/) shows that the code is correct. If you are missing the core then no widgets will work

```
$(function (){
    $('.accordion').accordion();
});

```