I need a programmatic way to get the decimal value of each character in a String, so that I can encode them as HTML entities, for example:

**UTF-8:**

```
著者名

```

**Decimal:**

```
&#33879;&#32773;&#21517;

```