Op vrijdag 21 september 2018 10:02:02 CEST schreef c.holterm...@gmx.de: > Dear developers, > > thinking about moving from python2 to 3 I wonder how character > encoding in the backend is done. Can you point me to some docs > about that ? Which encoding in sqlite, mysql, xml ? Where does > encoding take place, where is it being controlled ? I don't need > an extensive answer, just some pointers where to start looking.
>From memory I believe we force our gnucash data to be utf-8 at all times. As this is also the encoding used by glib2 internally there is no need for extra encoding functionality in the backends. While not supported users could make changes to the xml data outside of the application and insert invalid utf-8 in that case. To protect against that we have one function to validate strings in the xml data file while loading/ saving. It's called checked_char_cast and is located in: https://github.com/Gnucash/gnucash/blob/maint/libgnucash/backend/xml/gnc-xml-helper.cpp I don't think we have something similar in the db backends. I think we rely on the dbms to handle this for us. I'm writing much in conditional terms as I don't know this part in gnucash very thoroughly. John may correct me if I misunderstood. Geert _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel