---
title: "Truncate string values"
canonical: "https://docs.perspectium.com/space/helium/2113886/Truncate%20string%20values"
format: markdown
---
In the  DataSync Agent , you can truncate string values if you have exceeded a column's max length (UTF-8). I f you are using  UTF-8  characters and prefer using  VARCHAR  or a string data type where the specified length is strictly the number of bytes, you will be able to truncate the string value as well.    NOTE : UTF-8 characters may have multiple bytes per character.  If you use multiple UTF-8 characters and the number of bytes exceeds what is allowed in a column, an error will occur.  You can prevent this by either adding  <byte_padding/>   or if you want to keep the original length and truncate the string values, add  <truncate_utf8/>  directive within your agent.xml configuration file. If you use a different character encoding, you can instead use <database_truncate_encoding> and set your specified encoding. NOTE :  Currently, the <database_truncate_encoding> directive only allow these encoding values: ISO_8859_1 US_ASCII UTF_16 UTF_16BE UTF_16LE  UTF_8 Prerequisites  First, you will need to set up one of the Perspectium  DataSync Agents .   You should also  stop running your DataSync Agent  before making any Agent configuration changes.   Request the databases.xml file for your DataSync Agent by contacting  Perspectium Support . Procedure To truncate string values for your DataSync integration, follow these steps: