470,636 Members | 1,553 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

Help with windows clipboard and accented characters

This little script used to work but now does not:

import win32clipboard,sys,re

s = 'André'

# Paste string to clipboard
win32clipboard.OpenClipboard(0)
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText(s)
win32clipboard.CloseClipboard()

Now I get this on the clipboard:

André

How can I fix this?

Stephen
Jul 18 '05 #1
3 1293
Works on my system (Windows XP Pro, Python 2.2).
I run this, open MS Word, select EDIT-PASTE and
André is pasted in perfectly.

FYI,
Larry Bates
Syscon, Inc.

"Stephen Boulet" <stephendotboulet@motorola_._com> wrote in message
news:cd**********@newshost.mot.com...
This little script used to work but now does not:

import win32clipboard,sys,re

s = 'André'

# Paste string to clipboard
win32clipboard.OpenClipboard(0)
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText(s)
win32clipboard.CloseClipboard()

Now I get this on the clipboard:

André

How can I fix this?

Stephen

Jul 18 '05 #2
That's bizarre. I did upgrade to python 2.3.4 and pywin32-202. Maybe
that had something to do with it.

Stephen

Larry Bates wrote:
Works on my system (Windows XP Pro, Python 2.2).
I run this, open MS Word, select EDIT-PASTE and
André is pasted in perfectly.

FYI,
Larry Bates
Syscon, Inc.

Jul 18 '05 #3

"Stephen Boulet" <stephendotboulet@motorola_._com> wrote in message
news:cd**********@newshost.mot.com...
This little script used to work but now does not: s = 'André'


If you have non-ascii chars in string literals in 2.3+, I believe you need
the coding comment at the top of the file. The 2.3 what's new should say
something.

tjr

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bernhard Georg Enders | last post: by
1 post views Thread by Fuzzyman | last post: by
14 posts views Thread by Nicolas Bouillon | last post: by
2 posts views Thread by Remco van den Berg | last post: by
1 post views Thread by gsauns | last post: by
1 post views Thread by Korara | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.