On Fri, 23 Mar 2018 12:05:34 +1100, Chris Angelico wrote:
> Latin-1 is not "arbitrary bytes". It is a very specific encoding that
> cannot decode every possible byte value.
Yes it can.
py> blob = bytes(range(256))
py> len(blob)
256
py> blob[45:55]
b'-./0123456'
py> s = blob.decode('latin1')
py>
I want to create a simple python app using pyqt,QWebView and google maps with
markers.
The problem is that,the markers does not load inside the QWebView, as you can
see they load just fine in the browser.
here the simple code :
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui i
On Fri, Mar 23, 2018 at 11:39 AM, Steven D'Aprano
wrote:
> On Fri, 23 Mar 2018 11:08:56 +1100, Chris Angelico wrote:
>> Okay. Give me a good reason for the database itself to be locked to
>> Latin-1. Make sure you explain how potentially saving the occasional
>> byte of storage (compared to UTF-8)
On Fri, 23 Mar 2018 11:08:56 +1100, Chris Angelico wrote:
> On Fri, Mar 23, 2018 at 10:47 AM, Steven D'Aprano
> wrote:
>> On Fri, 23 Mar 2018 07:09:50 +1100, Chris Angelico wrote:
>>
I was reading though, that JSON files must be encoded with UTF-8. So
should I be doing string.decode('l
On Fri, Mar 23, 2018 at 11:39 AM, Ben Finney wrote:
> Chris Angelico writes:
>
>> There is NOT always a good reason for a suboptimal configuration.
>
> True. Did anyone claim otherwise?
>
> What I saw Steven responding to was your claim that there is *never* a
> good reason to do it.
>
> To refut
On 22/03/18 20:46, Tobiah wrote:
> I was reading though, that JSON files must be encoded with UTF-8. So
> should I be doing string.decode('latin-1').encode('utf-8')? Or does
> the json module do that for me when I give it a unicode object?
Definitely not. In fact, that won't even work.
>>> impo
Chris Angelico writes:
> There is NOT always a good reason for a suboptimal configuration.
True. Did anyone claim otherwise?
What I saw Steven responding to was your claim that there is *never* a
good reason to do it.
To refute that, it's sufficient to show that good reason can exist in
some c
On Fri, Mar 23, 2018 at 11:25 AM, Ben Finney wrote:
> Chris Angelico writes:
>
>> On Fri, Mar 23, 2018 at 10:47 AM, Steven D'Aprano
>> wrote:
>> > On Fri, 23 Mar 2018 07:09:50 +1100, Chris Angelico wrote:
>> >> Reconfigure your MySQL database to use UTF-8. There is no reason to
>> >> use Latin-1
Chris Angelico writes:
> On Fri, Mar 23, 2018 at 10:47 AM, Steven D'Aprano
> wrote:
> > On Fri, 23 Mar 2018 07:09:50 +1100, Chris Angelico wrote:
> >> Reconfigure your MySQL database to use UTF-8. There is no reason to
> >> use Latin-1 in the database.
> >
> > You don't know that. You don't know
On Fri, Mar 23, 2018 at 10:47 AM, Steven D'Aprano
wrote:
> On Fri, 23 Mar 2018 07:09:50 +1100, Chris Angelico wrote:
>
>>> I was reading though, that JSON files must be encoded with UTF-8. So
>>> should I be doing string.decode('latin-1').encode('utf-8')? Or does
>>> the json module do that for
On Fri, 23 Mar 2018 07:09:50 +1100, Chris Angelico wrote:
>> I was reading though, that JSON files must be encoded with UTF-8. So
>> should I be doing string.decode('latin-1').encode('utf-8')? Or does
>> the json module do that for me when I give it a unicode object?
>
> Reconfigure your MySQL
I want to create a simple python app using pyqt,QWebView and google maps with
markers.
The problem is that,the markers does not load inside the QWebView, as you can
see they load just fine in the browser.
here the simple code :
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui impo
On 03/22/2018 01:09 PM, Chris Angelico wrote:
On Fri, Mar 23, 2018 at 6:46 AM, Tobiah wrote:
I have some mailing information in a Mysql database that has
characters from various other countries. The table says that
it's using latin-1 encoding. I want to send this data out
as JSON.
So I'm jus
On Fri, Mar 23, 2018 at 6:46 AM, Tobiah wrote:
> I have some mailing information in a Mysql database that has
> characters from various other countries. The table says that
> it's using latin-1 encoding. I want to send this data out
> as JSON.
>
> So I'm just taking each datum and doing 'name'.d
I have some mailing information in a Mysql database that has
characters from various other countries. The table says that
it's using latin-1 encoding. I want to send this data out
as JSON.
So I'm just taking each datum and doing 'name'.decode('latin-1')
and adding the resulting Unicode value ri
On 2018-03-22 19:37, Damjan Stojanovski wrote:
> i am sorry but i can not find a way to attach an image here so you can see
> what i mean. Please someone tell me how to add an image here.
>
This is a text only list.
--
https://mail.python.org/mailman/listinfo/python-list
On 3/22/2018 2:37 PM, Damjan Stojanovski wrote:
i am sorry but i can not find a way to attach an image here so you can see what
i mean. Please someone tell me how to add an image here.
You cannot and there is no need. List is text only, no attachments.
Reduce code to the minimum needed to ge
On Thu, Mar 22, 2018 at 2:37 PM, Damjan Stojanovski
wrote:
> i am sorry but i can not find a way to attach an image here so you can see
> what i mean. Please someone tell me how to add an image here.
You can't. Copy/paste the error. And please include the post you are
replying to.
--
https://ma
i am sorry but i can not find a way to attach an image here so you can see what
i mean. Please someone tell me how to add an image here.
Thanks
Dan
--
https://mail.python.org/mailman/listinfo/python-list
Dear all
I am totally new in learning Python and i am learning from a beginner's book
called automate the boring stuff with Python and i downloaded the Python 64 bit
version for Windows and i started writing some examples from the book. At the
end whenever i try to run the program i keep gettin
20 matches
Mail list logo