Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How would I populate a text field with double quotes using the Field Calculator. For example, I want to populate a field as 24". Is there a way to populate fields using the field calculator with this value? If I use "24"", I get an error because of the two double quotes.

Thanks in advance!

share|improve this question
Found the answer... "24\"" ... need to escape out the double quote. – boyle.matt Apr 25 '14 at 18:59
Thanks for the quick replies, didn't know you could use single quotes with python, easy solution! – boyle.matt Apr 25 '14 at 19:03
In the VB parser it's "24""" that's "" to insert a " and " to finish so 3x". Another option is chr(42) where 42 is the ASCII code for " so "24" & chr(42) – Michael Miles-Stimson Apr 26 '14 at 2:49

Change the parser to Python using the radio button at the top of the field calculator window, then use single-quotes to enclose your text:


Python allows you to use either single- or double-quotes to enclose a string. If you wanted to use an apostrophe in your text field, you would use double-quotes instead:

share|improve this answer

with python, you can use either " " or ' ' to identify your text

so you could do it like this :


but the best method if you don't want to play with \' and \" when you have both ' and " in your string, is to use the triple """

""" 24's" """

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.