Copy link to clipboard
Copied
Illustrator 25.2.3 on Windows 10 Pro 10.0.19042 Build 19042, x64-based PC
I have a Variable Library where one of the variables for every single Data Set is a different quotation. It's crucial that the text is presented as a quote using quotation marks. However, when loading using Load Variable Library the quotation marks are removed during the process.
I've tried saving as each of the four styles of CSV that Microsoft Excel allows with no success. Also tried a Copy Paste into Google Sheets and then saving from there as a CSV without success. Excel would not allow me to save as XML "because the workbook does not contain any XML mappings".
Also tried replacing the quotation marks with Unicode symbols using «» but those did not translate to the "" symbol and just showed up as «». Tried going into Document Setup->Type to change Double Quotes back and forth from «» to "" but it doesn't refresh text that's already loaded. Not sure if there are other methods to trick Illustrator into keeping the "" symbol during Load Variable Library. Find and Replace doesn't work either, as it only works within the current Data Set and you have to click Update Data Set every time you move to the next Data Set.
Frustrating to be so close and yet so far. Manually typing quotation marks to the front and back of that variable on every single Data Set and then having to manually click Update Data Set is probably more time consuming than doing a manual Copy-Paste. But then I would have to manually Copy-Paste all the other variables that were working properly, so I'm essentially stuck between two bad methods. Not sure if there are other methods to get this to work or if I need to go with a third-party solution that's better than Variables.
Copy link to clipboard
Copied
Have you tried "escaping" the character, as in Regex?
\"
Copy link to clipboard
Copied
I am not familiar with that method but would be glad to learn more and try it out.
Copy link to clipboard
Copied
Just try adding a \ before each double quote in your text before uploading the library. This should tell JavaScript to read the subsequent character literally instead of seeing it as defining a string. It may also be necessary to add a double quote BEFORE the \.
Edit: Of course, search and replace can make that an easy task in Excel or Text Editor.
Copy link to clipboard
Copied
Thank you for your suggestion. I tried both \" and "\ then exporting to CSV UTF-8 (Comma delimited) in Excel and unfortunately neither version worked. I subsequently attempted both the \" and "\ versions with each of the three other versions of CSV that Excel can export and none of those worked either. And only CSV UTF-8 appears to carry over symbols within the body of a text when importing to Illustrator, whereas the other CSV versions will convert symbols such as - to an empy space, eliminate the space, or replace with ? so none of those alternative CSV versions are ideal even if they did retain the " symbol on the front and end of the text.
I also tried using a forward slash instead of a backward slash just to try it and those didn't work either.
However, while trying your suggestion another idea came to me. I replaced all double quotation marks with two single quotation marks, then exported to CSV UTF-8. So '' instead of " which appears the same with the particular font I am using in the project, Century Gothic. And this time the two single qoutation marks did not disappear, so I found a solution! Not sure if it's a workable solution for fonts that display single quotation marks differently from double quotation marks, but it worked for me for this particular project.
Copy link to clipboard
Copied
Following up on this: The solution I found isn't perfect because Illustrator interprets the two single quotation marks as neutral/vertical when the ideal would be for it to import double quotation marks correctly so that they can be shown in the curved typographic style. So while I have a partial solution it's not fully solved.
Copy link to clipboard
Copied
How you type them in your CSV file may make a difference. On Mac "single-curly-quotes" are "Opt+}" and "Opt+Shift+}". Double-curly-quotes are "Opt+{" and "Opt+Shift+{". Not sure if that helps.
Copy link to clipboard
Copied
I looked up guides on this for Windows 10. Apparently Excel on Windows 10 does not allow typographer single quotation marks in Excel using similar command keys to Apple. However, the workaround is to paste all the entries into Microsoft Word, replace all the neutral quotation marks using Find-Replace, and then paste everything back into Microsoft Excel. Excel retains the typographer quotation marks when pasted in from Word.
Illustrator does import these single quotation marks in typographer style. However, the Tracking between the single quote marks is not the same as a double quotation and looks awkward. Furthermore, using Variables means you cannot selectively change font attributes within a Dynamic Text string. Moving to the next Data Set applies that font attribute to the entire Dynamic Text variable and thus the change of Tracking to make two single quotes look like double quotes affects all the other text as well.
So unfortunately it appears that the best I can do right now is two single vertical quotation marks. Can't think of another method using Variables at the current time.
Copy link to clipboard
Copied
I don't know if this solves your particular issue or not but it solved mine, which was getting quotes and specifically curly quotes into a variable data merge correctly. Excel is wackly when it comes to quotes for some reason. I'm guessing it has something to do with character codes and formulas but I'm really not sure. Regardless, this process worked for me and the excel solution came from my boss Joan P who is an Excel master and also frickin' hilarious.
There's three steps to this solution:
In Illustrator when you open this .csv in the Variables panel and bind variables you should see the quotes now show up how you want them to. For my project I needed curly quotes for measurements. Be sure when you bind your variable data to a text object that you've assigned to that text object a font that supports curly quotes.
Another tip: Say you have multiple quotes marks and are worried a batch replace may replace the wrong ones. If thats the case, just replace your quotes in the excel file with a unique word or unique character string that's not used anywhere else, something you can isolate when you do your Find/Replace step above.
I hope that helps someone.
Copy link to clipboard
Copied
Heads up.... I spent a good hour trying to solve this issue. When using excel, it's a problem with export. I used proper "curly cues" (“”) and they exported fine if you export using CSV in UTF-8 format! For some reason, any Mac, MS-DOS or ASCII variation does not work.