# Unicode and API \[Feb 24\]

**URL:** <https://community.nocodb.com/t/unicode-and-api-feb-24/187>\
**Category:** Discord-Discussions\
**Created:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187 "2022-11-03T07:57:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/1 "2022-11-03T07:57:16Z")

</div>

> 🙋‍♂️ **Pierric** _asked_

## hi ! I’m new to NocoDB. I’ve prototyped a small N8N chain to play around, and it was working on a development deploy of NocoDB, powered by SQLite. But since I want to be able to edit table structure flexibly in the future, I’ve now deployed MariaDB and recreated my NocoDB container accordingly. Now the exact same N8N process fails at the NocoDB step with an “incorrect string value” error from MariaDB, apparently because the strings I’m inserting have some unicode characters. How can I overcome this? (I would like to keep the Unicode characters if possible) The field that fails is defined as SingleLineText.

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/2 "2022-11-03T07:57:17Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### I’m noticing that when I add text directly to a table from the GUI, unicode characters are accepted. But when it’s over the API, I get the mentioned error.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/3 "2022-11-03T07:57:19Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### Additionally, it seems that MariaDB is using UTF-8 by default, and entries created directly from the GUI are stored correct as UTF-8. It’s just through the API that I’m getting this error 400 due to that MariaDB error.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/4 "2022-11-03T07:57:20Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### if that is useful, I am using [linuxserver.io/mariadb](http://linuxserver.io/mariadb) on Arm7, together with the official nocodb container.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/5 "2022-11-03T07:57:21Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### I’m starting to think this is on the N8N side

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/6 "2022-11-03T07:57:22Z")

</div>

> 💁 **o1lab** _replied_

#### The table create API are not cross compatible with databases

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/7 "2022-11-03T07:57:23Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### Hmmm… I’m not sure I understand what you mean. Just to be clear after moving from sqlite to mariadb i didn’t reuse / migrate anything in the dB side. I created everything from scratch again.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/8 "2022-11-03T07:57:25Z")

</div>

> 💁 **o1lab** _replied_

#### I reread the description, so it looks like it has to do with probably encoding or escaping those unicode? See what is the difference when compared to GUI and API

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/9 "2022-11-03T07:57:26Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### that’s where I’m at a loss. I can’t really capture the API call going out from n8n (though if I have time and can’t solve this I might write a little Flask app to simulate the nocodb API and output the n8n request… happy to hear about better solutions if they exist!). But from the n8n source code it looks like the request should be good, and when I do a call to nocodb API directly from the console with CURL, I can insert utf-8 without problem. So I don’t see where the difference can be 😦

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/10 "2022-11-03T07:57:27Z")

</div>

> 💁 **o1lab** _replied_

#### Hard to tell

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/11 "2022-11-03T07:57:28Z")

</div>

> 💁 **o1lab** _replied_

#### You can log in n8n I think

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/12 "2022-11-03T07:57:29Z")

</div>

> 💁 **o1lab** _replied_

#### Like if it’s source code node I mean

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/13 "2022-11-03T07:57:31Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### hmm … I did write a little “listener” in python and the request looks fine … here’s what the python looks like:

#### 

#### ```python

#### import http.server as SimpleHTTPServer

#### import socketserver as SocketServer

#### import logging

#### 

#### PORT = 9876

#### 

#### class GetHandler(

#### SimpleHTTPServer.SimpleHTTPRequestHandler

#### ):

#### 

#### def do\_POST(self):

#### print(self.headers)

#### content\_len = int(self.headers.get(‘content-length’, 0))

#### post\_body = self.rfile.read(content\_len)

#### print(post\_body)

#### with open(‘output.txt’,‘wb’) as f:

#### f.write(post\_body)

#### 

#### def do\_GET(self):

#### logging.error(self.headers)

#### SimpleHTTPServer.SimpleHTTPRequestHandler.do\_GET(self)

#### 

#### 

#### Handler = GetHandler

#### httpd = SocketServer.TCPServer((“”, PORT), Handler)

#### 

#### httpd.serve\_forever()

#### ```

#### 

#### and here’s the output.txt file:

#### ```text

#### [{“gmailid”:“17f259931d268600”},{“gmailid”:“17f258573645e9e3”},{“gmailid”:“17f22604a66e97b3”,“subject”:“🎪 “Les films doivent être des dessins qui prennent vie””},{“gmailid”:“17f2245118cccf93”},{“gmailid”:“17f222b4395f3ac4”}]

#### ```

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/14 "2022-11-03T07:57:32Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### (I modified my n8n nodes to not return personal data but still return some unicode)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/15 "2022-11-03T07:57:33Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### it prints on screen (through the print command before I write to file) as:

#### ```text

#### b’[{“gmailid”:“17f259931d268600”},{“gmailid”:“17f258573645e9e3”},{“gmailid”:“17f22604a66e97b3”,“subject”:“\xf0\x9f\x8e\xaa \xe2\x80\x9cLes films doivent \xc3\xaatre des dessins qui prennent vie\xe2\x80\x9d”},{“gmailid”:“17f2245118cccf93”},{“gmailid”:“17f222b4395f3ac4”}]’

#### ```

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/16 "2022-11-03T07:57:34Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### headers are as such:

#### ```text

#### Accept: application/json

#### xc-auth: kljlk

#### Content-Type: application/json

#### User-Agent: axios/0.21.4

#### Content-Length: 232

#### Host: pi4:9876

#### Connection: close

#### ```

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/17 "2022-11-03T07:57:35Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### but that seems to break mariadb when the exact same request goes to nocodb

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/18 "2022-11-03T07:57:37Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### now I’m at a loss again. I’ve tried using Curl queries again with that same text, copy/pasted directly, and nocodb returns an error again, even though with other unicode characters previously it didn’t.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/19 "2022-11-03T07:57:38Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### ok, I got something! it depends on the actual range of the unicode character. 🎪 breaks nocodb+mariadb, no matter the method (curl or n8n) whereas ⏪ works all the time.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 7:57am UTC](https://community.nocodb.com/t/unicode-and-api-feb-24/187/20 "2022-11-03T07:57:39Z")

</div>

> 🙋‍♂️ **Pierric** _replied_

#### i’m not super savvy about unicode, but I’d say both are supposed to be utf-8?

#

[Next page](https://community.nocodb.com/t/unicode-and-api-feb-24/187.md?page=2)
