Conversion of “%” to single-byte/double-byte when importing data using import set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2025 09:35 PM
import set is used to import data from CSV to String type items.
One item is set to the string “100%”.
The “%” in “100%” is set to a single-byte character in the CSV.
However, when data is imported using the import set, it is saved in the String item as “100%” (the “%” becomes a double-byte character) in the target table. (When the data in the target table is exported in CSV and checked, it is in full-width characters.)
Is it a ServiceNow specification that the % becomes a double-byte character when importing CSV data using an import set?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2025 11:33 PM
Hi @Ohki_Yamamoto ,
No, it is not a standard specification of ServiceNow for the % character to automatically become a double-byte (full-width) character.
Check 2 things
- Check if any transformation scripts or mappings are modifying the data during import.
- Verify that the data type for the target column is set to String.
If the behavior persists and it’s confirmed to be caused by encoding, you can write a transformation script.
if (source.fieldName) {
source.fieldName = source.fieldName.replace(/%/g, '%'); // Replace full-width % with half-width
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 12:02 AM
Thank you very much.
I see that OOTB does not have a specification to convert “%” to single-byte/double-byte.
Now, when I import a CSV with an import set, the “%” is already full-width a single-byte on the import set table.
So it is a double-byte before I run the conversion map, but I don't know why?
In addition to the “%,” I am also experiencing an event where the number “2” is changed from a single-byte to a double-byte.
However, these conversions do not occur all the time, but occasionally occur when a record is converted to a double-byte characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 05:28 AM
Hi @Ohki_Yamamoto ,
looks like your excel is not having data format properly, share the excel which you are import, just keep only 1-2 record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2025 04:24 PM
We use CSV as input, not Excel.
The CSV is single-byte characters, but when imported into the import set table, they are double-byte characters.