Re: Unicode/UTF-8 confusion

2008-03-16 Thread Tom Stambaugh
I want to thank this community -- especially Carsten Haese -- for your patience with my confusion and for your several suggestions about how to resolve the issue. As a newcomer to python-list, I appreciate your willingness to respond to my request and your graciousness in helping me see the con

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Carsten Haese
On Sat, 2008-03-15 at 16:33 -0400, Tom Stambaugh wrote: > I appreciate the answers the community has provided, I think I need to add > some additional context. > [...] > var aSerializedObject = '%(jsonString)s'; > [...] > Once back in the browser, the loadObject method calls JSON.parse on > a

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Marc 'BlackJack' Rintsch
On Sat, 15 Mar 2008 16:33:24 -0400, Tom Stambaugh wrote: > I use a trick to let me pass the information into my browser client > application. The browser requests the server information from a form whose > target is a hidden iframe. The string the server serializes is wrapped in > html that emb

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
I appreciate the answers the community has provided, I think I need to add some additional context. I use a trick to let me pass the information into my browser client application. The browser requests the server information from a form whose target is a hidden iframe. The string the server ser

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Marc Christiansen
Tom Stambaugh <[EMAIL PROTECTED]> wrote: >> Somehow I don't get what you are after. The ' doesn't have to be escaped >> at all if " are used to delimit the string. If ' are used as delimiters >> then \' is a correct escaping. What is the problem with that!? > > If I delimit the string with doub

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Carsten Haese
On Sat, 2008-03-15 at 20:03 +0100, Carsten Haese wrote: > On Sat, 2008-03-15 at 12:09 -0400, Tom Stambaugh wrote: > > [...] > > I use simplejson to serialize html strings that the server is delivering to > > a browser. Since the apostrophe is a string terminator in javascript, I > > need > > to

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Carsten Haese
On Sat, 2008-03-15 at 12:09 -0400, Tom Stambaugh wrote: > [...] > I use simplejson to serialize html strings that the server is delivering to > a browser. Since the apostrophe is a string terminator in javascript, I need > to escape any apostrophe embedded in the html. > [...] simplejson escapes

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Matt Nordhoff
Tom Stambaugh wrote: > I'm still confused about this, even after days of hacking at it. It's > time I asked for help. I understand that each of you knows more about > Python, Javascript, unicode, and programming than me, and I understand > that each of you has a higher SAT score than me. So please

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
> Somehow I don't get what you are after. The ' doesn't have to be escaped > at all if " are used to delimit the string. If ' are used as delimiters > then \' is a correct escaping. What is the problem with that!? If I delimit the string with double quote, then I have to escape every double quo

Re: Unicode/UTF-8 confusion

2008-03-15 Thread Marc 'BlackJack' Rintsch
On Sat, 15 Mar 2008 12:09:19 -0400, Tom Stambaugh wrote: > I'm still confused about this, even after days of hacking at it. It's time I > asked for help. I understand that each of you knows more about Python, > Javascript, unicode, and programming than me, and I understand that each of > you ha

Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
I'm still confused about this, even after days of hacking at it. It's time I asked for help. I understand that each of you knows more about Python, Javascript, unicode, and programming than me, and I understand that each of you has a higher SAT score than me. So please try and be gentle with you

Unicode/UTF-8 confusion

2008-03-15 Thread Tom Stambaugh
I'm still confused about this, even after days of hacking at it. It's time I asked for help. I understand that each of you knows more about Python, Javascript, unicode, and programming than me, and I understand that each of you has a higher SAT score than me. So please try and be gentle with your r