Re: String encoding question

2009-09-19 Thread Joshua Russo
On Sat, Sep 19, 2009 at 3:07 PM, Karen Tracey wrote: > On Sat, Sep 19, 2009 at 11:51 AM, Joshua Russo wrote: > >> Just one other thing. I was under the impression that x = u'' >> is equivalent to x = Unicode(''). Is that not correct? Seeing as you seem >> to be indicating a difference between th

Re: String encoding question

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 11:51 AM, Joshua Russo wrote: > Just one other thing. I was under the impression that x = u'' is equivalent > to x = Unicode(''). Is that not correct? Seeing as you seem to be > indicating a difference between the unicode object and a literal. > > > Note you could answer t

Re: String encoding question

2009-09-19 Thread Joshua Russo
On Sat, Sep 19, 2009 at 2:40 PM, Karen Tracey wrote: > On Sat, Sep 19, 2009 at 11:19 AM, Joshua Russo wrote: > >> ... in fact using utf-8 string literals can cause problems in other places >>> with code that assumes another encoding (e.g. ascii) for byte strings. >>> >> >> Could you expand on thi

Re: String encoding question

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 11:19 AM, Joshua Russo wrote: > ... in fact using utf-8 string literals can cause problems in other places >> with code that assumes another encoding (e.g. ascii) for byte strings. >> > > Could you expand on this? I know that the Unicode string object has > different method

Re: String encoding question

2009-09-19 Thread Masklinn
On 19 Sep 2009, at 17:19 , Joshua Russo wrote: >> ... in fact using utf-8 string literals can cause problems in other >> places >> with code that assumes another encoding (e.g. ascii) for byte >> strings. >> > > Could you expand on this? I know that the Unicode string object has > different me

Re: String encoding question

2009-09-19 Thread Joshua Russo
> > ... in fact using utf-8 string literals can cause problems in other places > with code that assumes another encoding (e.g. ascii) for byte strings. > Could you expand on this? I know that the Unicode string object has different methods than standard String, but are there other scenarios where

Re: String encoding question

2009-09-19 Thread Joshua Russo
On Sat, Sep 19, 2009 at 1:31 PM, Karen Tracey wrote: > On Sat, Sep 19, 2009 at 9:59 AM, Joshua Russo wrote: > >> I was working through some regression tests and saw a scenario I thought >> wasn't allowed/recommended. I was under the impression that if you specified >> UTF-8 encoding at the top of

Re: String encoding question

2009-09-19 Thread Masklinn
On 19 Sep 2009, at 16:31 , Karen Tracey wrote: > Without the encoding declaration, the interpreter would not know the > encoding of the source bytes, so would be unable (without making some > assumption) to correctly build unicode string objects from unicode > literals. It doesn't even bother tr

Re: String encoding question

2009-09-19 Thread Karen Tracey
On Sat, Sep 19, 2009 at 9:59 AM, Joshua Russo wrote: > I was working through some regression tests and saw a scenario I thought > wasn't allowed/recommended. I was under the impression that if you specified > UTF-8 encoding at the top of the file you where not suppose to use u > decorated unicode

Re: String encoding question

2009-09-19 Thread Masklinn
On 19 Sep 2009, at 15:59 , Joshua Russo wrote: > I was working through some regression tests and saw a scenario I > thought > wasn't allowed/recommended. I was under the impression that if you > specified > UTF-8 encoding at the top of the file you where not suppose to use u > decorated unicod

String encoding question

2009-09-19 Thread Joshua Russo
I was working through some regression tests and saw a scenario I thought wasn't allowed/recommended. I was under the impression that if you specified UTF-8 encoding at the top of the file you where not suppose to use u decorated unicode static string. So instead of u'prédio' I use 'prédio' in files