Re: [sqlite] How to find out encoding for a table
I have a COM wrapper product, and also a Database Manager tool. The COM wrapper will have a property for specifying the encoding to use for the table (UTF-8 or 16). I haven't gotten to the point of finding out if different tables can use different encoding within a given database file. Can they? (BTW, where is all of this documented?). There are cases, such as with the Database Manager tool, where you might want to be able query the table (or DB file) to discover and use the correct encoding scheme, so that no coversions will need to be done. For example, if the encoding in the table is UTF-16, I don't want to use the UTF8 functions to read the data. Do you see? thanks try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com Darren Duncan wrote: At 9:06 AM +1000 8/28/04, EzTools Support wrote: No one has answered this query yet. Please can someone help with it. Thanks. try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com EzTools Support wrote: Hello all. I have found that I can create a table and write data to that table as either UTF-8 or UTF-16 by using "PRAGMA encoding...", so that all of the field names and text data are written as the encoding type. I need to be able to query (discover) the encoding of a table when the encoding is unknown. How do I do this? TIA -brett While this doesn't answer your question, I would ask why you need to know this information? SQLite 3 provides APIs for both encodings, so you can just use the one that corresponds to the encoding that your application uses internally, for simplicity. SQLite 3 will internally convert back and forth between the API you use and the encoding used on disk, so you don't have to. Also, unless I'm incorrect, all text in a SQLite database uses the same encoding; you can't choose different ones on a by-table basis. -- Darren Duncan
Re: [sqlite] How to find out encoding for a table
At 9:06 AM +1000 8/28/04, EzTools Support wrote: No one has answered this query yet. Please can someone help with it. Thanks. try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com EzTools Support wrote: Hello all. I have found that I can create a table and write data to that table as either UTF-8 or UTF-16 by using "PRAGMA encoding...", so that all of the field names and text data are written as the encoding type. I need to be able to query (discover) the encoding of a table when the encoding is unknown. How do I do this? TIA -brett While this doesn't answer your question, I would ask why you need to know this information? SQLite 3 provides APIs for both encodings, so you can just use the one that corresponds to the encoding that your application uses internally, for simplicity. SQLite 3 will internally convert back and forth between the API you use and the encoding used on disk, so you don't have to. Also, unless I'm incorrect, all text in a SQLite database uses the same encoding; you can't choose different ones on a by-table basis. -- Darren Duncan
Re: [sqlite] How to find out encoding for a table
No one has answered this query yet. Please can someone help with it. Thanks. try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com EzTools Support wrote: Hello all. I have found that I can create a table and write data to that table as either UTF-8 or UTF-16 by using "PRAGMA encoding...", so that all of the field names and text data are written as the encoding type. I need to be able to query (discover) the encoding of a table when the encoding is unknown. How do I do this? TIA -brett
[sqlite] How to find out encoding for a table
Hello all. I have found that I can create a table and write data to that table as either UTF-8 or UTF-16 by using "PRAGMA encoding...", so that all of the field names and text data are written as the encoding type. I need to be able to query (discover) the encoding of a table when the encoding is unknown. How do I do this? TIA -brett -- try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com