Error if Cyrillic symbols in comments #8802

Closed
opened 2025-12-29 20:41:19 +01:00 by adam · 6 comments
Owner

Originally created by @BitConf on GitHub (Nov 2, 2023).

NetBox version

3.6.3

Python version

3.11

Steps to Reproduce

  1. Edit any instance (Sites or Virtual Machines - doesn't matter)
  2. Add any Cyrillic symbols to field Comments

Expected Behavior

Expected that UTF-8 symbols were accepted

Observed Behavior

Server Error

There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.db.utils.NotSupportedError'>

conversion between UTF8 and SQL_ASCII is not supported
LINE 1: ...t": 1, "custom_fields": {}, "tags": []}'::jsonb, E'{"create...
^

Python version: 3.11.4
NetBox version: 3.6.3
Plugins: None installed

If further assistance is required, please post to the NetBox discussion forum on GitHub.

Originally created by @BitConf on GitHub (Nov 2, 2023). ### NetBox version 3.6.3 ### Python version 3.11 ### Steps to Reproduce 1. Edit any instance (Sites or Virtual Machines - doesn't matter) 2. Add any Cyrillic symbols to field Comments ### Expected Behavior Expected that UTF-8 symbols were accepted ### Observed Behavior Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'django.db.utils.NotSupportedError'> conversion between UTF8 and SQL_ASCII is not supported LINE 1: ...t": 1, "custom_fields": {}, "tags": []}'::jsonb, E'{"create... ^ Python version: 3.11.4 NetBox version: 3.6.3 Plugins: None installed If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub.
adam closed this issue 2025-12-29 20:41:20 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 2, 2023):

Add any Cyrillic symbols to field Comments

Please provide the exact text someone else can use to reproduce the reported behavior.

@jeremystretch commented on GitHub (Nov 2, 2023): > Add any Cyrillic symbols to field Comments Please provide the exact text someone else can use to reproduce the reported behavior.
Author
Owner

@BitConf commented on GitHub (Nov 2, 2023):

The test message is: Тест

@BitConf commented on GitHub (Nov 2, 2023): The test message is: Тест
Author
Owner

@abhi1693 commented on GitHub (Nov 5, 2023):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.6.4. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

@abhi1693 commented on GitHub (Nov 5, 2023): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.6.4. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.
Author
Owner

@sleepinggenius2 commented on GitHub (Nov 6, 2023):

I've definitely seen this happen when the database is not correctly configured for UTF-8 encoding. It would be nice if the error message was a bit more helpful in that respect, but that's definitely the first thing I would check. Run the psql REPL, then execute the SHOW SERVER_ENCODING; and \l commands and check that the encodings are correct.

@sleepinggenius2 commented on GitHub (Nov 6, 2023): I've definitely seen this happen when the database is not correctly configured for UTF-8 encoding. It would be nice if the error message was a bit more helpful in that respect, but that's definitely the first thing I would check. Run the `psql` REPL, then execute the `SHOW SERVER_ENCODING;` and `\l` commands and check that the encodings are correct.
Author
Owner

@jeremystretch commented on GitHub (Nov 9, 2023):

I can confirm that NetBox accepts Unicode content in object comments when the underlying database supports UTF-8 encoding, per @sleepinggenius2's comment above. If you would like further assistance with correcting your database configuration, please consider starting a discussion.

@jeremystretch commented on GitHub (Nov 9, 2023): I can confirm that NetBox accepts Unicode content in object comments when the underlying database supports UTF-8 encoding, per @sleepinggenius2's comment above. If you would like further assistance with correcting your database configuration, please consider starting a [discussion](https://github.com/netbox-community/netbox/discussions/new/choose).
Author
Owner

@BitConf commented on GitHub (Nov 10, 2023):

test

@BitConf commented on GitHub (Nov 10, 2023): ![test](https://github.com/netbox-community/netbox/assets/9640081/f0a80c04-6045-4816-a477-ad9f70c7f9f9)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8802