Re: about special characters

2016-04-30 Thread Jianling Fan
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

Re: about special characters

2016-04-30 Thread MRAB
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

Re: about special characters

2016-04-30 Thread Terry Reedy
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

Re: about special characters

2016-04-30 Thread Jianling Fan
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

Re: about special characters

2016-04-29 Thread MRAB
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

Re: about special characters

2016-04-29 Thread Ben Finney
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

Re: about special characters

2016-04-29 Thread eryk sun
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

Re: about special characters

2016-04-29 Thread Terry Reedy
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

Re: about special characters

2016-04-29 Thread Ben Finney
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

Re: about special characters

2016-04-29 Thread Steven D'Aprano
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

Re: about special characters

2016-04-29 Thread Steven D'Aprano
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"

Re: about special characters

2016-04-29 Thread MRAB
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

Re: about special characters

2016-04-29 Thread Ben Finney
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

about special characters

2016-04-29 Thread Jianling Fan
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

Re: Passing special characters in soap data

2013-04-30 Thread John Gordon
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... >

RE: Passing special characters in soap data

2013-04-30 Thread Ombongi Moraa Fe
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

Re: Handling Special characters in python

2013-01-02 Thread Chris Rebert
>> > > > 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 &

Re: Handling Special characters in python

2013-01-02 Thread anilkumar . dannina
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 > > &

Re: Handling Special characters in python

2013-01-01 Thread Chris Rebert
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

Re: Handling Special characters in python

2013-01-01 Thread anilkumar . dannina
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

Re: Handling Special characters in python

2013-01-01 Thread Chris Rebert
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

Re: Handling Special characters in python

2013-01-01 Thread Steven D'Aprano
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

Handling Special characters in python

2013-01-01 Thread anilkumar . dannina
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

RE: How to sort list of String without considering Special characters and with case insensitive

2012-11-27 Thread Prasad, Ramit
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

Re: How to sort list of String without considering Special characters and with case insensitive

2012-11-27 Thread MRAB
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

How to sort list of String without considering Special characters and with case insensitive

2012-11-27 Thread san
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

Re: string contains and special characters

2012-10-09 Thread Ulrich Eckhardt
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

Re: string contains and special characters

2012-10-09 Thread loial
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

Re: string contains and special characters

2012-10-09 Thread Mark Lawrence
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

Re: string contains and special characters

2012-10-09 Thread Jerry Hill
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..

Re: string contains and special characters

2012-10-09 Thread Dave Angel
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("") : >

Re: string contains and special characters

2012-10-09 Thread Dave Angel
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

Re: string contains and special characters

2012-10-09 Thread Agon Hajdari
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

string contains and special characters

2012-10-09 Thread 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("") : Do I need to escape the characters...and if so how? -- http://mail.python.org/mailman/listinf

Problem with special characters in the password field (urllib)

2012-03-18 Thread Bernhard Heijstek
#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

Re: can I use element tree for handling special characters in xml text?

2011-07-27 Thread Thomas 'PointedEars' Lahn
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

Re: can I use element tree for handling special characters in xml text?

2011-07-27 Thread Stefan Behnel
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

can I use element tree for handling special characters in xml text?

2011-07-27 Thread hackingKK
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

Re: how to get Python to insert special characters in an xml file?

2011-07-15 Thread Philip Semanchuk
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

how to get Python to insert special characters in an xml file?

2011-07-15 Thread hackingKK
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

Re: list of regex special characters

2010-11-28 Thread Ben Finney
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

Re: list of regex special characters

2010-11-28 Thread Tim Chase
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

Re: list of regex special characters

2010-11-28 Thread Ben Finney
. > 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

list of regex special characters

2010-11-28 Thread goldtech
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

Re: Web page special characters encoding

2010-07-10 Thread mattia
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

Re: Web page special characters encoding

2010-07-10 Thread John Nagle
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

Re: Web page special characters encoding

2010-07-10 Thread Christian Heimes
> 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:

Re: Web page special characters encoding

2010-07-10 Thread mattia
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

Re: Web page special characters encoding

2010-07-10 Thread MRAB
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

Re: Web page special characters encoding

2010-07-10 Thread Rami Chowdhury
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

Web page special characters encoding

2010-07-10 Thread mattia
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

Re: Special characters (^M & ^[[D) when I read pxssh::before and write it to a file

2010-03-17 Thread Benjamin Kaplan
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

Special characters (^M & ^[[D) when I read pxssh::before and write it to a file

2010-03-17 Thread ashwini yal
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

Re: ignore special characters in python regex

2009-07-21 Thread Gabriel Genellina
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

Re: ignore special characters in python regex

2009-07-21 Thread Astan Chee
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

Re: ignore special characters in python regex

2009-07-20 Thread John Machin
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

Re: ignore special characters in python regex

2009-07-20 Thread Frank Buss
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

ignore special characters in python regex

2009-07-20 Thread Astan Chee
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&#

Re: problem with special characters in filename

2009-01-23 Thread Diez B. Roggisch
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

Re: problem with special characters in filename

2009-01-23 Thread Diez B. Roggisch
[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

Re: problem with special characters in filename

2009-01-23 Thread Murali Murali
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

problem with special characters in filename

2009-01-23 Thread fizzotti
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 "

Re: interpretation of special characters in Python

2008-07-07 Thread TP
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

Re: interpretation of special characters in Python

2008-07-07 Thread Peter Pearson
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 >

Re: interpretation of special characters in Python

2008-07-07 Thread TP
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:

Re: interpretation of special characters in Python

2008-07-07 Thread Peter Otten
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] > >> $

Re: interpretation of special characters in Python

2008-07-07 Thread TP
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=

Re: interpretation of special characters in Python

2008-07-07 Thread Ben Finney
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

Re: interpretation of special characters in Python

2008-07-06 Thread TP
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

Re: interpretation of special characters in Python

2008-07-06 Thread TP
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)

Re: interpretation of special characters in Python

2008-07-06 Thread Peter Pearson
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

interpretation of special characters in Python

2008-07-06 Thread TP
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

Re: How to import filenames with special characters?

2008-06-24 Thread Gary Herron
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 to import filenames with special characters?

2008-06-24 Thread inhahe
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

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-04 Thread Jussi Salmela
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,'

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread Bjoern Schliessmann
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

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread Robin Becker
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

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread [EMAIL PROTECTED]
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 ä)

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread Bjoern Schliessmann
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

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread Hallvard B Furuseth
[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

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread Peter Otten
[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

Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread Robin Becker
[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

Sorting strings containing special characters (german 'Umlaute')

2007-03-02 Thread [EMAIL PROTECTED]
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

Re: Special Characters

2007-02-28 Thread Gabriel Genellina
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

Re: Special Characters

2007-02-27 Thread Sick Monkey
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

Special Characters

2007-02-27 Thread Sick Monkey
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

Re: how to store and still search special characters in Python and MySql

2007-02-15 Thread Justin Ezequiel
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

how to store and still search special characters in Python and MySql

2007-02-11 Thread ronrsr
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

Re: Special Characters (Unicode, Ascii) in Python and MySQL

2007-01-02 Thread Carsten Haese
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

Special Characters (Unicode, Ascii) in Python and MySQL

2007-01-01 Thread ronrsr
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

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Leo Kislov
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

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Fredrik Lundh
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

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Fredrik Lundh
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

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
> > > 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'

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread fumanchu
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

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
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

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
version of python is 2.2 - -- http://mail.python.org/mailman/listinfo/python-list

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread John Nagle
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

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
> > 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

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
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   2   >