repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
output asked headers in the order they were asked; avoid header name spoofing by...
[hband-tools.git]
/
user-tools
/
noacute
blob
709b8c4ba327a8a8f72706b363abbde8131c6121
1
#!/usr/bin/env python
2
3
"""
4
=pod
5
6
=head1 NAME
7
8
noacute - Strip diacritics (acute, umlaut, ...) from letters on the input stream
9
10
=cut
11
12
"""
13
14
15
import
sys
16
import
unicodedata
17
18
while True
:
19
line
=
sys
.
stdin
.
readline
()
20
if
line
==
''
:
21
break
22
line
=
line
.
decode
(
'utf-8'
)
23
print
unicodedata
.
normalize
(
'NFKD'
,
line
).
encode
(
'ASCII'
,
'ignore'
),