Re: [SQLObject] Setting encoding on sqlite (on disk) DB
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2011-02-18 08:16:17
|
On Fri, Feb 18, 2011 at 11:12:29AM +0300, Oleg Broytman wrote: > On Fri, Feb 18, 2011 at 03:50:41PM +0800, Jason Heeris wrote: > > When using MySQL with SQLObject, I can use a URI like: > > "mysql://.../db?charset=utf8" to indicate the encoding. What's the > > equivalent for SQLite? What if I create the tables using the > > .createTable() class method ??? how do I specify it there? > > Does SQLite support anything other than UTF-8? I think it's always > UTF-8 so you don't need (and actually, cannot) change anything. Aha, it does, to some extent: http://www.sqlite.org/pragma.html#pragma_encoding "It is not possible to change the text encoding of a database after it has been created and any attempt to do so will be silently ignored." So you only need this PRAGMA once - before you create you database. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |