Is there any limit on what I can put in the Customer notes field?

John Ralls jralls at ceridwen.us
Fri Sep 30 17:28:07 EDT 2016


> On Sep 30, 2016, at 7:09 PM, Derek Atkins <warlord at mit.edu> wrote:
> 
> John Ralls <jralls at ceridwen.us> writes:
> 
>> David,
>> 
>> You can put any text you like in the Notes field, but make sure that
>> it's legitimate XML PData: Use the & and < entities if you need
>> to use those characters, and don't try to put any additional markup in
>> it. The only size limitation would be imposed by the GUI, which uses a
>> GtkTextBuffer to hold it. That exposes functions that index bytes (the
>> encoding is assumed to be utf8) and return ints, so you're limited to
>> 2^31 characters. That should be sufficient for your needs.
> 
> If you're editing through the UI then I *THINK* you should be okay and
> wouldn't need to encode the strings -- that de/encoding should happen
> during the save/load process.

Derek,

He said he wants to store and retrieve through the API, not the UI, but you might be right that the XML escaping takes place in the backend rather than at extracting from the UI. It would make more sense, as there's no need to escape for SQL.

Regards,
John Ralls




More information about the gnucash-user mailing list