Skip to main content
Best answer

Cannot convert from Unicode 120183 to SQLWCHAR. Value is too large.

  • December 9, 2024
  • 5 replies
  • 59 views

I am using a ZAP to import responses to a Facebook form to a SQL Database. Unfortunately users are from time to time adding an emoji to their response which causes this error on Zapier. 

It seems Zapiers solution is to create a FORMATTER and replace text to change the emoji characters to something else but this is not practical as there are 100’s of different emoji a user could use. 

Are there any suggestions to just strip out all UNICODE characters rather?

Best answer by Badger

@woodzza 

You may need one formatter for each field rather than combining them. 

My understanding is that formatters these don’t cost you tasks, so having multiple ones is just a case of working your way through the what needs changing and then adding to your SQL Step.

Renaming them is a good idea as it makes it easier to workout which one you’re grabbing data from. 

I noticed you’re using a legacy version of the SQL Server. You may wish to consider updating to the latest version. 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Badger
Forum|alt.badge.img+5
  • New
  • December 9, 2024

@woodzza 

There are a couple of approaches you can use to get your text into ASCII. The easiest is to use the text formatter to convert to ASCII which will replace all non-ASCII characters. Configuration would be as below.

 

 

The other would be to use a code block, especially if I need to manipulate the data. Python is my preferred language, so I would do something like below.  

 

import re

user_response = input_data['user_response']

# Strip non-ASCII characters using regex
cleaned_response = re.sub(r'[^\x00-\x7F]+', '', user_response)


return {'Cleaned Text': cleaned_response}

 

Hope this helps.


  • Author
  • New
  • December 9, 2024

thanks ​@Badger , this does help give a bit of direction - almost. What I cant see is how to apply this to multiple fields; it seems to allow me to select multiple inputs but then they get combined into a single output as opposed to just having those values updates before being passed to the next step (SQL SERVER).

 


Badger
Forum|alt.badge.img+5
  • New
  • Answer
  • December 9, 2024

@woodzza 

You may need one formatter for each field rather than combining them. 

My understanding is that formatters these don’t cost you tasks, so having multiple ones is just a case of working your way through the what needs changing and then adding to your SQL Step.

Renaming them is a good idea as it makes it easier to workout which one you’re grabbing data from. 

I noticed you’re using a legacy version of the SQL Server. You may wish to consider updating to the latest version. 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • December 10, 2024

Thanks so much for marking Badger’s reply as the best answer here ​@woodzza! Really pleased they were able to help get things sorted—and thanks for helping out here, ​@Badger! 🤗 

If there’s anything else you need please do reach back out to the Community again. In the meantime, happy Zapping! ⚡


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • April 1, 2025

Hey folks! 👋

Just circling back here to share an update—the bug that caused “Cannot convert from Unicode 120183 to SQLWCHAR. Value is too large” errors when emojis were used has been fixed! 🎉

This means any Formatter actions added to remove Unicode characters should no longer be needed, but please note: 

“for the best results when working with emojis or special characters, we recommend using nvarchar column types. SQL Server does not reliably support Unicode characters in types like varchar”

That said, should you run into any issues when using emojis or special characters, feel free to start a new topic or reach out to our Support team directly and we’ll be happy to help. 🙂