Oh, sorry, let me update my last post:

if i have a string, let's say:

s = "hi giorgio";

and want to store it in a latin1 db, i need to convert it to latin1 before
storing, right?

2010/3/3 Giorgio <anothernetfel...@gmail.com>

>
>>>  byte_string = unicode_string.encode('utf-8')
>>
>> If you use unicode strings throughout your application, you will be happy
>> with the above. Note that this is an advice, not a condition.
>
>
>
> Mmm ok. So all strings in the app are unicode by default?
>
> Do you know if there is a function/method i can use to check encoding of a
> string?
>
>
>>
>> "default encodings" are bad, don't rely on them.
>>
>
> No, ok, it was just to understand what i'm working with.
>
> Patrick, ok. I should check if it's possible to save unicode strings in the
> DB.
>
> Do you think i'd better set my db to utf8? I don't need latin1, it's just
> the default value.
>
> Thankyou
>
> Giorgio
>
>
> --
> --
> AnotherNetFellow
> Email: anothernetfel...@gmail.com
>



-- 
--
AnotherNetFellow
Email: anothernetfel...@gmail.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to