Questions tagged [unidecoder]

`Unidecoder` is library provides methods to transliterate Unicode characters to an ASCII approximation.

Unidecoder is library provides methods to transliterate Unicode characters to an ASCII approximation.

17 questions
0
votes
3 answers

A substite for "for looping" in text files

from unidecode import * reader = open("a.txt",'w') def unite(): for line in reader: line = unidecode(line) print (line) unite() Now, I get an error saying for looping is not allowed in write mode. Is there any other way, I can…
madprogramer
  • 599
  • 3
  • 12
  • 36
0
votes
2 answers

Problems catching unidecoder exceptions

I'm trying out the unidecoder gem and it's giving me problems with some strings: require 'unidecoder' str = "\u00A3" str.to_ascii #: (C:/Ruby193/lib/ruby/gems/1.9.1/gems/unidecoder-1.1.1/lib/unidecoder/data/x00.yml): found unknown escape…
pguardiario
  • 53,827
  • 19
  • 119
  • 159
1
2