Oh, it works!
This is the simplest and best way!
Thanks very much!
On 30 April 2016 at 13:42, MRAB wrote:
> On 2016-04-30 19:13, Jianling Fan wrote:
>>
>> Hello everyone,
>>
>> Thanks very much for all your replies and sorry for the inconvience.
>> This is my first time to post question in th
On 2016-04-30 19:13, Jianling Fan wrote:
Hello everyone,
Thanks very much for all your replies and sorry for the inconvience.
This is my first time to post question in this list.
I am using python 2.7 in Windows 7 Enterprise version.
Here is the the filename that cause the problem: "Decock-201
On 4/30/2016 2:13 PM, Jianling Fan wrote:
I am using python 2.7 in Windows 7 Enterprise version.
Here is the the filename that cause the problem: "Decock-2013-On the
potential of δ18O and δ15N.pdf"
When I delete the "δ" in the filename, the script works good.
You may be able to get "δ" (and o
est = SRC, DEST
if len(sys.argv) == 3:
src, dest = sys.argv[1:3]
sync_files(src, dest)
Thanks again!
On 29 April 2016 at 19:01, Steven D'Aprano wrote:
> On Sat, 30 Apr 2016 09:33 am, Jianling Fan wrote:
>
>> Hello everyone,
>>
>> I am trying to use pyth
On 2016-04-30 03:35, eryk sun wrote:
On Fri, Apr 29, 2016 at 8:48 PM, Ben Finney wrote:
Steven D'Aprano writes:
On Sat, 30 Apr 2016 09:52 am, Ben Finney wrote:
> (There has never been a Python 27. I assume Python 2.7 is what you
> meant.)
I believe that Python X.Y shows up as "PythonXY" und
Terry Reedy writes:
> On 4/29/2016 9:48 PM, Ben Finney wrote:
> > Steven D'Aprano writes:
> >
> >> On Sat, 30 Apr 2016 09:52 am, Ben Finney wrote:
> >>
> >>> (There has never been a Python 27. I assume Python 2.7 is what you
> >>> meant.)
> >>
> >> I believe that Python X.Y shows up as "PythonXY
On Fri, Apr 29, 2016 at 8:48 PM, Ben Finney wrote:
> Steven D'Aprano writes:
>> On Sat, 30 Apr 2016 09:52 am, Ben Finney wrote:
>>
>> > (There has never been a Python 27. I assume Python 2.7 is what you
>> > meant.)
>>
>> I believe that Python X.Y shows up as "PythonXY" under Windows.
>
> Then th
On 4/29/2016 9:48 PM, Ben Finney wrote:
Steven D'Aprano writes:
On Sat, 30 Apr 2016 09:52 am, Ben Finney wrote:
(There has never been a Python 27. I assume Python 2.7 is what you
meant.)
I believe that Python X.Y shows up as "PythonXY" under Windows.
As a directory name that also omits t
Steven D'Aprano writes:
> On Sat, 30 Apr 2016 09:52 am, Ben Finney wrote:
>
> > (There has never been a Python 27. I assume Python 2.7 is what you
> > meant.)
>
> I believe that Python X.Y shows up as "PythonXY" under Windows.
Then that's a bug which should be fixed, IMO. An MS Windows user (i.e
On Sat, 30 Apr 2016 09:33 am, Jianling Fan wrote:
> Hello everyone,
>
> I am trying to use python 27 copying some of my folders and files to
> another directory.
> My code works good for other files but I have some problem to copy
> files that have some special characters in
On Sat, 30 Apr 2016 09:52 am, Ben Finney wrote:
> Jianling Fan writes:
>
>> I am trying to use python 27 copying some of my folders and files to
>> another directory.
>
> (There has never been a Python 27. I assume Python 2.7 is what you meant.)
I believe that Python X.Y shows up as "PythonXY"
files that have some special characters in the filename. like
filenames contain Greek "δ" or latin "š".
You may already know that Python 2 handles international text a lot less
consistently than Python 3.
Is it at all feasible for you to use Python 3 instead? Text handling i
Jianling Fan writes:
> I am trying to use python 27 copying some of my folders and files to
> another directory.
(There has never been a Python 27. I assume Python 2.7 is what you meant.)
> My code works good for other files but I have some problem to copy
> files that have
Hello everyone,
I am trying to use python 27 copying some of my folders and files to
another directory.
My code works good for other files but I have some problem to copy
files that have some special characters in the filename. like
filenames contain Greek "δ" or latin "š&quo
In Ombongi Moraa Fe
writes:
> My provider sends soap data to me as they receive from subscriber. as
> expected the messages with special characters like quotes are received as
> html entities.
> like the message below had a quote:
> ...I'll shape it up myself...
>
Hi Team,
My provider sends soap data to me as they receive from subscriber. as
expected the messages with special characters like quotes are received as
html entities.
like the message below had a quote:
I'll shape it up myself...
Since i pass this data into my python script as a co
>> > > > I am facing one issue in my module. I am gathering data from sql
>> > > > server database. In the data that I got from db contains special
>> > > > characters like "endash". Python was taking it as "\x96". I require
&
I am facing one issue in my module. I am gathering data from sql server
> > > > database. In the data that I got from db contains special characters
> > > > like "endash". Python was taking it as "\x96". I require the same
> > &
On Jan 1, 2013 8:48 PM, wrote:
> On Wednesday, January 2, 2013 12:00:06 AM UTC+5:30, Chris Rebert wrote:
> > On Jan 1, 2013 3:41 AM, wrote:
> >
> > > I am facing one issue in my module. I am gathering data from sql
server database. In the data that I got from db contains
On Wednesday, January 2, 2013 12:00:06 AM UTC+5:30, Chris Rebert wrote:
> On Jan 1, 2013 3:41 AM, wrote:
>
> >
>
> > I am facing one issue in my module. I am gathering data from sql server
> > database. In the data that I got from db contains special characters lik
On Jan 1, 2013 3:41 AM, wrote:
>
> I am facing one issue in my module. I am gathering data from sql server
database. In the data that I got from db contains special characters like
"endash". Python was taking it as "\x96". I require the same
character(endash). How c
On Tue, 01 Jan 2013 03:35:56 -0800, anilkumar.dannina wrote:
> I am facing one issue in my module. I am gathering data from sql server
> database. In the data that I got from db contains special characters
> like "endash". Python was taking it as "\x96". I requir
I am facing one issue in my module. I am gathering data from sql server
database. In the data that I got from db contains special characters like
"endash". Python was taking it as "\x96". I require the same character(endash).
How can I perform that. Can you please help
san wrote:
>
> Please let me know how to sort the list of String in either ascending /
> descending order without considering
> special characters and case.
> ex: list1=['test1_two','testOne','testTwo','test_one']
> Applying the l
On 2012-11-27 17:31, san wrote:
Please let me know how to sort the list of String in either ascending /
descending order without considering special characters and case.
ex: list1=['test1_two','testOne','testTwo','test_one']
Applying the list.so
Please let me know how to sort the list of String in either ascending /
descending order without considering special characters and case.
ex: list1=['test1_two','testOne','testTwo','test_one']
Applying the list.sort /sorted method results in sorted
Am 09.10.2012 16:02, schrieb loial:
I am trying to match a string that containing the "<" and ">"
characters, using the string contains function, but it never seems to
find the lines containing the string
e.g if mystring.contains("") :
I can't locate a 'contains' function anywhere, what type i
On Tuesday, 9 October 2012 15:19:33 UTC+1, Agon Hajdari wrote:
> On 10/09/2012 04:02 PM, loial wrote: > I am trying to match a string that
> containing the "<" and ">" characters, using the string contains function,
> but it never seems to find the lines containing the string > > e.g if
> mystri
On 09/10/2012 15:23, Dave Angel wrote:
On 10/09/2012 10:02 AM, loial wrote:
I am trying to match a string that containing the "<" and ">" characters, using
the string contains function, but it never seems to find the lines containing the string
e.g if mystring.contains("") :
Do I need to esca
On Tue, Oct 9, 2012 at 10:02 AM, loial wrote:
> I am trying to match a string that containing the "<" and ">" characters,
> using the string contains function, but it never seems to find the lines
> containing the string
>
> e.g if mystring.contains("") :
>
> Do I need to escape the characters..
On 10/09/2012 10:23 AM, Dave Angel wrote:
> On 10/09/2012 10:02 AM, loial wrote:
>> I am trying to match a string that containing the "<" and ">" characters,
>> using the string contains function, but it never seems to find the lines
>> containing the string
>>
>> e.g if mystring.contains("") :
>
On 10/09/2012 10:02 AM, loial wrote:
> I am trying to match a string that containing the "<" and ">" characters,
> using the string contains function, but it never seems to find the lines
> containing the string
>
> e.g if mystring.contains("") :
>
> Do I need to escape the characters...and if so
On 10/09/2012 04:02 PM, loial wrote:
> I am trying to match a string that containing the "<" and ">" characters,
> using the string contains function, but it never seems to find the lines
> containing the string
>
> e.g if mystring.contains("") :
>
> Do I need to escape the characters...and if
I am trying to match a string that containing the "<" and ">" characters, using
the string contains function, but it never seems to find the lines containing
the string
e.g if mystring.contains("") :
Do I need to escape the characters...and if so how?
--
http://mail.python.org/mailman/listinf
#x27;m not using any special characters like
!@#$%^&*() in the password. I tried some pretty basic debugging and saw that
the execution stops beyond line 35 which is where the authentication happens.
So I figured that this has got to do something with urrllib and special
characters in the passwo
I can safely include special characters like & or >
> in xml text?
(I don't know what you want to know, so don't ask me that.)
You need CDATA sections for this. That is not a Python problem.
You should get a real name.
--
PointedEars
Bitte keine Kopien per
hackingKK, 27.07.2011 13:16:
I have been waiting a lot to ask this question and I did ask some days back
but probably could not put it the proper way.
I assume you missed the answer you got?
I want to know how I can safely include special characters like & or > in
xml text?
For ex
Hello all.
I have been waiting a lot to ask this question and I did ask some days
back but probably could not put it the proper way.
I want to know how I can safely include special characters like & or >
in xml text?
For example I store a small xml file containing list of organisation
On Jul 15, 2011, at 7:53 AM, hackingKK wrote:
> Hello all.
> I am currently developing a python application which reads and writes some
> data to an xml file.
> I use the elementTree library for doing this.
> My simple question is that if I have some thing like & as in "kk & company "
> as orga
Hello all.
I am currently developing a python application which reads and writes
some data to an xml file.
I use the elementTree library for doing this.
My simple question is that if I have some thing like & as in "kk &
company " as organisation name, how can I have Python take this as a
litte
Tim Chase writes:
> On 11/28/2010 05:58 PM, goldtech wrote:
> > I am looking for a list of special character in python regular
> > expressions that need to be escaped if you want their literal
> > meaning.
>
> Trust the re module to tell you:
>
> >>> import re
> >>> chars = [chr(i) for i in ran
On 11/28/2010 05:58 PM, goldtech wrote:
I am looking for a list of special character in python regular
expressions that need to be escaped if you want their literal meaning.
I searched and can not find the list. Any help appreciated.
Trust the re module to tell you:
>>> import re
>>> chars
.
> I searched and can not find the list. Any help appreciated.
>>> import re
>>> help(re)
…
DESCRIPTION
…
The special characters are: …
--
\ “I got some new underwear the other
I am looking for a list of special character in python regular
expressions that need to be escaped if you want their literal meaning.
I searched and can not find the list. Any help appreciated.
--
http://mail.python.org/mailman/listinfo/python-list
Il Sat, 10 Jul 2010 16:24:23 +, mattia ha scritto:
> Hi all, I'm using py3k and the urllib package to download web pages. Can
> you suggest me a package that can translate reserved characters in html
> like "è", "ò", "é" in the corresponding correct
> encoding?
>
> Thanks,
> Mattia
Basically
On 7/10/2010 2:03 PM, mattia wrote:
Il Sat, 10 Jul 2010 18:09:12 +0100, MRAB ha scritto:
mattia wrote:
Hi all, I'm using py3k and the urllib package to download web pages.
Can you suggest me a package that can translate reserved characters in
html like "è", "ò", "é" in the corresponding
correc
> Hi all, I'm using py3k and the urllib package to download web pages. Can
> you suggest me a package that can translate reserved characters in html
> like "è", "ò", "é" in the corresponding correct
> encoding?
I think the html parser of LXML can convert the entities, too.
Christian
--
http:
Il Sat, 10 Jul 2010 18:09:12 +0100, MRAB ha scritto:
> mattia wrote:
>> Hi all, I'm using py3k and the urllib package to download web pages.
>> Can you suggest me a package that can translate reserved characters in
>> html like "è", "ò", "é" in the corresponding
>> correct encoding?
>>
> import r
mattia wrote:
Hi all, I'm using py3k and the urllib package to download web pages. Can
you suggest me a package that can translate reserved characters in html
like "è", "ò", "é" in the corresponding correct
encoding?
import re
from html.entities import entitydefs
# The downloaded web page w
On Jul 10, 2010, at 09:24 , mattia wrote:
> Hi all, I'm using py3k and the urllib package to download web pages. Can
> you suggest me a package that can translate reserved characters in html
> like "è", "ò", "é" in the corresponding correct
> encoding?
It won't do the whole job for you but you
Hi all, I'm using py3k and the urllib package to download web pages. Can
you suggest me a package that can translate reserved characters in html
like "è", "ò", "é" in the corresponding correct
encoding?
Thanks,
Mattia
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Mar 17, 2010 at 9:54 AM, ashwini yal wrote:
> Hi,
>
> I am writing a python script which logs into the machine using pxssh, sends
> a command, reads the response and writes the response to the file.
>
> But, when I open the file in the editor like vi, its showing sp
Hi,
I am writing a python script which logs into the machine using pxssh, sends
a command, reads the response and writes the response to the file.
But, when I open the file in the editor like vi, its showing special
characters like ^M and ^[[D instead of spaces or newlines.
This is how my code
En Tue, 21 Jul 2009 02:02:57 -0300, Astan Chee
escribió:
I'm reading text from a file (per line) and I want to do a regex using
these lines but I want the regex to ignore any special characters and
treat them like normal strings.
Is there a regex function that can do this?
Here is w
but I want the regex to ignore any special characters and
treat them like normal strings.
Is there a regex function that can do this?
It would help if you were to say
(1) what "ignore ... characters" means -- pretend they don't exist?
(2) what are "special chararacters
On Jul 21, 3:02 pm, Astan Chee wrote:
> Hi,
> I'm reading text from a file (per line) and I want to do a regex using
> these lines but I want the regex to ignore any special characters and
> treat them like normal strings.
> Is there a regex function that can do this?
It wo
Astan Chee wrote:
> I'm reading text from a file (per line) and I want to do a regex using
> these lines but I want the regex to ignore any special characters and
> treat them like normal strings.
> Is there a regex function that can do this?
Maybe re.escape helps?
--
Frank
Hi,
I'm reading text from a file (per line) and I want to do a regex using
these lines but I want the regex to ignore any special characters and
treat them like normal strings.
Is there a regex function that can do this?
Here is what I have so far:
fp = open('file.txt
The above at least applies to Linux. I'm not sure about windows - I
*know* they have wide-char/unicode support, but I'm not sure how exactly
that is exposed via the python file apis
Just found this:
http://www.amk.ca/python/howto/unicode
there is a seciton about filenames and OSes in there
[email protected] schrieb:
using:
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Hello
I have two files (let's assume they are all in the same directory):
1) "a.dat" containing the single line "Sébastien.dat"
2) "Sébastien.dat" containing arbi
rename('b.dat',line) #renames file
file1.close()
From: "[email protected]"
To: [email protected]
Sent: Friday, January 23, 2009 2:43:24 PM
Subject: problem with special characters in filename
using:
Python 2.5.2 (r252:60911, Jul 31 2
using:
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Hello
I have two files (let's assume they are all in the same directory):
1) "a.dat" containing the single line "Sébastien.dat"
2) "Sébastien.dat" containing arbitraty data
I want to:
open "
Peter Pearson wrote:
> I don't understand exactly what you mean by "Sorry"
I means: please forgive me for having said that it does not work with
variables, because it is completely false.
Thanks one more time
Julien
--
TP (Tribulations Parallèles)
"Allez, Monsieur, allez, et la foi vous vien
On Mon, 07 Jul 2008 10:05:56 +0200, TP <[EMAIL PROTECTED]> wrote:
> TP wrote:
>
>> So, the python print command *can* interpret these 4-character as a single
>> character. It would be odd if there were no possibility to do the same
>> thing when the characters are (i) stored in a python variable
>
Peter Otten wrote:
esc = os.environ["esc"].decode("string-escape")
esc
> '\x1b'
print "%s[30;44malles so schoen bunt hier%s[0m" % (esc, esc)
> alles so schoen bunt hier
Thanks a lot for your help. It works perfectly.
Indeed, one can read in the documentation concerning encodings:
Peter Pearson wrote:
> On Sun, 06 Jul 2008 23:42:26 +0200, TP <[EMAIL PROTECTED]>
> wrote:
>>
>> $ python -c "print '\033[30;44m foo \033[0m'"
> [writes an escape sequence to stdout]
>
>> $ echo -e $esc$ColorBlackOnDarkblue foo $esc$ColorReset
> [also writes an escape sequence to stdout]
>
>> $
TP wrote:
> So, the python print command *can* interpret these 4-character as a single
> character. It would be odd if there were no possibility to do the same
> thing when the characters are (i) stored in a python variable
Sorry, it works when using variables. Try for example:
col="[0;31m"
esc=
TP <[EMAIL PROTECTED]> writes:
> Peter Pearson wrote:
>
> > When you tell python "print '\033[30;44m foo \033[0m'", python
> > interprets the "\033" as a single character.
>
> So, the python print command *can* interpret these 4-character as a
> single character.
Not "interpret", no.
It's more
Peter Pearson wrote:
Thanks for your answer.
> When you run echo, it recognizes the 4-character "esc" as a
> convention for representing a single character, and performs
> the re-interpretation for you. When you tell python
> "print '\033[30;44m foo \033[0m'", python interprets
> the "\033" as a
Dennis Lee Bieber wrote:
> Off-hand, I'd probably try first with:
>
> csi = "\033["
>
> and then define your
>
> colorblackondarkblue = $csi"30;44m"
Thanks for your answer.
I have tried this slight modification, but it does not change anything on my
terminal.
--
TP (Tribulations Parallèles)
On Sun, 06 Jul 2008 23:42:26 +0200, TP <[EMAIL PROTECTED]> wrote:
>
> $ python -c "print '\033[30;44m foo \033[0m'"
[writes an escape sequence to stdout]
> $ echo -e $esc$ColorBlackOnDarkblue foo $esc$ColorReset
[also writes an escape sequence to stdout]
> $ echo -n $esc$ColorBlackOnDarkblue foo
Hi everybody,
I am new to Python, I try to understand how Python treats special
characters. For example, if I execute the following line in a shell
console, I obtain a colored string:
$ python -c "print '\033[30;44m foo \033[0m'"
So, it works.
Some time ago, I have made a lo
inhahe wrote:
How would I import a python file whose name contains characters like .'s or
!'s?
Is there really _no_ way to do that? I have to use plain jane letters and
numbers for everything?
The import statement can't help you, but take a look at the __import__
builtin function and th
How would I import a python file whose name contains characters like .'s or
!'s?
Is there really _no_ way to do that? I have to use plain jane letters and
numbers for everything?
--
http://mail.python.org/mailman/listinfo/python-list
Robin Becker kirjoitti:
>
> Björn, in one of our projects we are sorting in javascript in several
> languages English, German, Scandinavian languages, Japanese; from
> somewhere (I cannot actually remember) we got this sort spelling
> function for scandic languages
>
> a
> .replace(/\u00C4/g,'
Robin Becker wrote:
> Björn, in one of our projects we are sorting in javascript in
> several languages English, German, Scandinavian languages,
> Japanese; from somewhere (I cannot actually remember) we got this
> sort spelling function for scandic languages
>
> a
> .replace(/\u00C4/g,'A~') //A
Bjoern Schliessmann wrote:
> Hallvard B Furuseth wrote:
>> [EMAIL PROTECTED] writes:
...
>
> In German, there are some different forms:
>
> - the classic sorting for e.g. word lists: umlauts and plain vowels
> are of same value (like you mentioned): ä = a
>
> - name list sorting for e.g. pho
On 2 Mrz., 15:25, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > For sorting the letter "Ä" is supposed to be treated like "Ae",
There are several way of defining the sorting order. The variant "ä
equals ae" follows DINDIN 5007 (according to wikipedia); defining (a
equals ä)
Hallvard B Furuseth wrote:
> [EMAIL PROTECTED] writes:
>> For sorting the letter "Ä" is supposed to be treated like "Ae",
>> therefore sorting this list should yield
>> l = ["Aber, "Ärger", "Beere"]
>
> Are you sure? Maybe I'm thinking of another language, I thought Ä
> shold be sorted together
[EMAIL PROTECTED] writes:
> For sorting the letter "Ä" is supposed to be treated like "Ae",
> therefore sorting this list should yield
> l = ["Aber, "Ärger", "Beere"]
Are you sure? Maybe I'm thinking of another language, I thought Ä shold
be sorted together with A, but after A if the words are ot
[EMAIL PROTECTED] wrote:
> I know that this topic has been discussed in the past, but I could not
> find a working solution for my problem: sorting (lists of) strings
> containing special characters like "ä", "ü",... (german umlaute).
> Consider the following list
[EMAIL PROTECTED] wrote:
> Hi !
>
> I know that this topic has been discussed in the past, but I could not
> find a working solution for my problem: sorting (lists of) strings
> containing special characters like "ä", "ü",... (german umlaute).
> Consider the
Hi !
I know that this topic has been discussed in the past, but I could not
find a working solution for my problem: sorting (lists of) strings
containing special characters like "ä", "ü",... (german umlaute).
Consider the following list:
l = ["Aber", "Beere&qu
En Tue, 27 Feb 2007 22:56:15 -0300, Sick Monkey <[EMAIL PROTECTED]>
escribió:
> I found out that when I was reading the file, there
> were additional blank spaces being appended to the value.
>
> To correct the issue, I just had to dp
> varName = msInfo[0].strip()
> finName = varName.str
finName = varName.strip()
On 2/27/07, Sick Monkey <[EMAIL PROTECTED]> wrote:
I have a quick question about handling values with special characters.
Lets say I have a file which contains:
==
blah#blah
==
Here is what I have fo
I have a quick question about handling values with special characters.
Lets say I have a file which contains:
==
blah#blah
==
Here is what I have for my code:
f6 = open(fileAttached)
msInfo = f6.readlines(); f6.close
On Feb 12, 12:26 pm, "ronrsr" <[EMAIL PROTECTED]> wrote:
> I have an MySQL database called zingers. The structure is:
>
> I am having trouble storing text, as typed in latter two fields.
> Special characters and punctuation all seem not to be stored and
> r
I have an MySQL database called zingers. The structure is:
zid - integer, key, autoincrement
keyword - varchar
citation - text
quotation - text
I am having trouble storing text, as typed in latter two fields.
Special characters and punctuation all seem not to be stored and
retrieved correctly
On Mon, 2007-01-01 at 21:57 -0800, ronrsr wrote:
> I have an MySQL database called zingers. The structure is:
>
> zid - integer, key, autoincrement
> keyword - varchar
> citation - text
> quotation - text
>
> I am having trouble storing text, as typed in latter two fiel
I have an MySQL database called zingers. The structure is:
zid - integer, key, autoincrement
keyword - varchar
citation - text
quotation - text
I am having trouble storing text, as typed in latter two fields.
Special characters and punctuation all seem not to be stored and
retrieved correctly
ronrsr wrote:
> > >
> > Try putting "use_unicode=True" in the MySQLdb "connect" call.
>
> tried that, and also added charset="utf8" -
>
> now, I can't do any string operations, I get the error msg:
>
> descriptor 'lower' requires a 'str' object but received a 'unicode'
> args = ("descript
ronrsr wrote:
> querystring = "update zingers set keywords = '%s', citation =
> '%s', quotation = %s' where zid = %d" %
> (keywords,citation,quotation,zid)
that's not a good way to pass strings to the database. for the right
way to do this, see:
http://effbot.org/pyfaq/how-do-i-e
ronrsr wrote:
> now, I can't do any string operations, I get the error msg:
>
> descriptor 'lower' requires a 'str' object but received a 'unicode'
> args = ("descriptor 'lower' requires a 'str' object but received
> a 'unicode'",)
what's a "string operation" in this context? are you tryi
> >
> Try putting "use_unicode=True" in the MySQLdb "connect" call.
tried that, and also added charset="utf8" -
now, I can't do any string operations, I get the error msg:
descriptor 'lower' requires a 'str' object but received a 'unicode'
args = ("descriptor 'lower' requires a 'str'
ronrsr wrote:
> code for storing to database:
>
> querystring = "update zingers set keywords = '%s', citation =
> '%s', quotation = %s' where zid = %d" %
> (keywords,citation,quotation,zid)
You're missing a single quote in there around the quotation %s.
Are you also replacing "\\" w
version of python is either 2.2 or 2.4
bests,
-rsr-
John Nagle wrote:
> ronrsr wrote:
--
http://mail.python.org/mailman/listinfo/python-list
version of python is 2.2 -
--
http://mail.python.org/mailman/listinfo/python-list
ronrsr wrote:
>>are you passing in the strings as Unicode strings, or as something else?
>> if you're using something else, what have you done to tell the
>>database what it is?
>>
>
>
>
> not at all sure what I'm passing it as.
>
> The database default encoding is utf-8
> the database collat
>
> are you passing in the strings as Unicode strings, or as something else?
> if you're using something else, what have you done to tell the
> database what it is?
>
not at all sure what I'm passing it as.
The database default encoding is utf-8
the database collation is utf-8
the page encod
structure for the DB:
CREATE TABLE `zingers` (
`zid` int(9) unsigned NOT NULL auto_increment,
`keywords` varchar(255) default NULL,
`citation` text,
`quotation` text,
PRIMARY KEY (`zid`)
) ENGINE=MyISAM DEFAULT CHARSET=UTF8 AUTO_INCREMENT=422 ;
code for stor
1 - 100 of 111 matches
Mail list logo