On Monday 07 January 2008, Oleg Broytmann wrote:
> On Mon, Jan 07, 2008 at 12:56:04PM -0500, Glenn MacGregor wrote:
> > Maybe I need to backup at bit. I am somewhat confused at this point.
> > I need to insert a string which contains a non-ascii character into
> > my database table, that character is Ch0xE9rie. E9 is the hex
> > representation of the acute-e. Do I need unicode to do this, do I
> > need to change the charset? What are my options?
>
>    In general, you can use unicode, but you don't have to. You are not
> obliged to use unicode.
>    In this particular case you have a str string from a file in an
> unknown charset, certainly not in utf-8, so you cannot use utf-8 as the
> charset. 

But he can use latin1 because that encoding is a 1-to-1 mapping of any 
8-bit char, so what you put in the db is what you get out of it, even if 
you do not know the encoding the input data uses.

> Probably for this column you don't need unicode at all. 
>    Without unicode your options are:
>
> -- use plain strings with StringCol;
> -- use binary data with BLOBCol;
> -- use complex data with PickleCol.
>
> Oleg.



-- 
Dan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to