# Unicode usernames

**URL:** <https://meta.discourse.org/t/unicode-usernames/277878>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [September 5, 2023, 4:50pm UTC](https://meta.discourse.org/t/unicode-usernames/277878 "2023-09-05T16:50:44Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [September 6, 2023, 1:56pm UTC](https://meta.discourse.org/t/unicode-usernames/277878/10 "2023-09-06T13:56:45Z")

</div>

> [@zengyunsi](#):
>
> But the header can not pass non-ASCII characters

It can, as proven by @supermathie above:

cURL

> [@supermathie](#):
>
> ```plaintext
> ○ → curl -s -L -H 'api-key: «redacted»' -H 'api-username: 运思' https://try.discourse.org/u/运思/notifications.json | jq '.users[0]'
> {
> "id": 41,
> "username": "运思",
> "name": "Michael Brown",
> "avatar_template": "/user_avatar/try.discourse.org/运思/{size}/208_2.png",
> "trust_level": 1,
> "assign_icon": "user-plus",
> "assign_path": "/u/运思/activity/assigned"
> }
> 
> ```

Python:

> [@supermathie](#):
>
> ```plaintext
> In [1]: import requests
> 
> In [2]: api_key = '«redacted»'
> 
> In [3]: r = requests.get('https://try.discourse.org/u/运思/notifications.json', headers = {
> 'api-key': api_key,
> 'api-username': '运思'.encode()
> })
> 
> In [4]: r.status_code
> Out[4]: 200
> 
> In [5]: r.json()['users'][0]
> Out[5]: 
> {'id': 41,
> 'username': '运思',
> 'name': 'Michael Brown',
> 'avatar_template': '/user_avatar/try.discourse.org/运思/{size}/208_2.png',
> 'trust_level': 1,
> 'assign_icon': 'user-plus',
> 'assign_path': '/u/运思/activity/assigned'}
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/unicode-usernames/277878)._
