Can python handle this characters: ć,č,ž,đ,š?
If can how" 8 2384
Stens wrote:
Can python handle this characters: ć,č,ž,đ,š?
If can how"
Heh, It is from croatian language. So this characters are changed.
Stens wrote:
Can python handle this characters: ć,č,ž,đ,š?
yes.
If can how"
depends on the use case: are you trying to put them in source code, in
files, on the terminal, ... ?
</F>
In <eh**********@ss408.t-com.hr>, Stens wrote:
Stens wrote:
>Can python handle this characters: ć,č,ž,đ,š?
If can how"
I wanna to change some characters in text (in the file) to the
characters at this address:
http://rapidshare.de/files/37244252/..._copy.png.html
Do you want to change the characters in a picture!? Your question still
is *very* vague. Please provide a more detailed description of the
problem at hand.
What do you have? A text file? In which encoding? And what do you want
to achieve?
Ciao,
Marc 'BlackJack' Rintsch
On Oct 18, 11:50 am, Stens <sgi...@email.t-com.hrwrote:
Stens wrote:
Can python handle this characters: c,c,,d,?
If can how"I wanna to change some characters in text (in the file) to the
characters at this address:
http://rapidshare.de/files/37244252/..._copy.png.html
You need to use unicode, see any python unicode tutorial, for example
this one http://www.amk.ca/python/howto/unicode or any other you can
find with google.
Your script can look like this:
# -*- coding: PUT-HERE-ENCODING-OF-THIS-SCRIPT-FILE -*-
import codecs
outfile = codecs.open("your output file", "w", "encoding of the output
file"):
for line in codecs.open("your input file", "r", "encoding of the input
file"):
outfile.write(line.replace(u'd',u'd'))
Leo Kislov wrote using google groups beta:
On Oct 18, 11:50 am, Stens <sgi...@email.t-com.hrwrote:
Stens wrote:
Can python handle this characters: c,c,,d,?
[snip]
outfile.write(line.replace(u'd',u'd'))
I hope you'll do better than google engeers who mess up croatian
characters in new google groups. Of course the last 'd' should be latin
d with stroke. I really typed it but google swallowed the stroke.
Leo Kislov wrote:
>
On Oct 18, 11:50 am, Stens <sgi...@email.t-com.hrwrote:
>Stens wrote:
>>Can python handle this characters: c,c,,d,? If can how"I wanna to change some characters in text (in the file) to the
characters at this address:
http://rapidshare.de/files/37244252/..._copy.png.html
You need to use unicode, see any python unicode tutorial, for example
this one http://www.amk.ca/python/howto/unicode or any other you can
find with google.
Your script can look like this:
# -*- coding: PUT-HERE-ENCODING-OF-THIS-SCRIPT-FILE -*-
import codecs
outfile = codecs.open("your output file", "w", "encoding of the output
file"):
for line in codecs.open("your input file", "r", "encoding of the input
file"):
outfile.write(line.replace(u'd',u'd'))
thx Leo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tetsuo |
last post by:
How do I get Python to work with foreign characters? When I try to
print them, I get a unicode error (characters not ASCII). Wasn't
unicode invented for the express purpose of working with...
|
by: kazuo fujimoto |
last post by:
Ricky,
I found your message now, because I also would encounter the same
problem.
Now I am using Hangle with Japaese.
What I did is as follow.
|
by: joakim.hove |
last post by:
Hello,
I am having great problems writing norwegian characters to file
from a python application. My (simplified) scenario is as follows:
1. I have a web form where the user can enter his...
|
by: dbhbarton |
last post by:
Had a thought that's grown on me. No idea if it's original or not- too
inexperienced in programming- but I guess there's no harm floating it
out there.
Python wins big on readability, and...
|
by: ddtl |
last post by:
Hello everybody,
I want to create a script which reads files in a
current directory and renames them according to some
scheme. The file names are in Russian - sometimes
the names encoded as...
|
by: sophie_newbie |
last post by:
Hi, I want to store python text strings that characters like "é" "Č"
in a mysql varchar text field. Now my problem is that mysql does not
seem to accept these characters. I'm wondering if there...
|
by: M.-A. Lemburg |
last post by:
On 2008-07-01 20:31, Peter Bulychev wrote:
You could write a codec which translates Unicode into a ASCII
lookalike characters, but AFAIK there is no standard for doing
this.
I guess the best...
|
by: TP |
last post by:
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:
$...
|
by: wannymahoots |
last post by:
optparse seems to be escaping control characters that I pass as
arguments on the command line. Is this a bug? Am I missing
something? Can this be prevented, or worked around?
This behaviour...
|
by: Liang Chen |
last post by:
Hope you all had a nice weekend.
I have a question that I hope someone can help me out. I want to run a Python program that uses Tkinter for the user interface (GUI). The program allows me to type...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shllpp 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |