Re: unicode html

2006-07-18 Thread Duncan Booth
Sybren Stuvel wrote: > Duncan Booth enlightened us with: >> Don't bother using named entities. If you encode your unicode as >> ascii replacing all non-ascii characters with the xml entity >> reference then your pages will display fine whatever encoding is >> specified in the HTTP headers. > > W

Re: unicode html

2006-07-18 Thread Duncan Booth
wrote: > As an example I would like to do this kind of conversion: > \uc3B4 => ô > for all available html entities. >>> u"\u3cB4".encode('ascii','xmlcharrefreplace') '㲴' Don't bother using named entities. If you encode your unicode as ascii replacing all non-ascii characters with the xml enti

Re: unicode html

2006-07-17 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > Hi, I've found lots of material on the net about unicode html > conversions, but still i'm having many problems converting unicode > characters to html entities. Is there any available function to solve > this issue? > As an example I woul

Re: unicode html

2006-07-17 Thread Damjan
> Hi, I've found lots of material on the net about unicode html > conversions, but still i'm having many problems converting unicode > characters to html entities. Is there any available function to solve > this issue? > As an example I would like to do this kind of

Re: unicode html

2006-07-17 Thread Jim
Sybren Stuvel wrote: > Jim enlightened us with: > > Ah, but I cannot change it. It is not my machine and the folks who > > own the machine perceive that the charset line that they use is the > > right one for them. > > Well, _you_ are the one providing the content, aren't you? ? This site has man

Re: unicode html

2006-07-17 Thread Jim
Sybren Stuvel wrote: > Jim enlightened us with: > > For example, I am programming a script that makes html pages, but I > > do not have the ability to change the "Content-Type .. charset=.." > > line that is sent preceeding those pages. > > "line"? Are you talking about the HTTP header? If it is wr

Re: unicode html

2006-07-17 Thread Jim
Sybren Stuvel wrote: > [EMAIL PROTECTED] enlightened us with: > > > As an example I would like to do this kind of conversion: > > \uc3B4 => ô > > for all available html entities. > > Why would you want that? Just make sure you declare your document as > UTF-8, encode it as such, and you're done. M

Re: unicode html

2006-07-17 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > X-No-Archive: yes > Hi, I've found lots of material on the net about unicode html > conversions, but still i'm having many problems converting unicode > characters to html entities. Is there any available function to solve > this issue? > A

unicode html

2006-07-17 Thread lorenzo . viscanti
X-No-Archive: yes Hi, I've found lots of material on the net about unicode html conversions, but still i'm having many problems converting unicode characters to html entities. Is there any available function to solve this issue? As an example I would like to do this kind of conversion: \