Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.
/ ASCII--Dammit Public archive

Stupid library to turn MS chars (like smart quotes) and ISO-Latin chars into ASCII, dammit. Will do plain text approximations, or more accurate HTML representations. Can also be jiggered to just fix the smart quotes and leave the rest of ISO-Latin alone.

Notifications You must be signed in to change notification settings

tnajdek/ASCII--Dammit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

#ASCII, Dammit

All credit goes to Leonard Richardson. I've just put this thing on github.

Stupid library to turn MS chars (like smart quotes) and ISO-Latin chars into ASCII, dammit. Will do plain text approximations, or more accurate HTML representations. Can also be jiggered to just fix the smart quotes and leave the rest of ISO-Latin alone.

##Usage french = '\x93Sacr\xe9 bleu!\x93' print asciiDammit(french) #"Sacre bleu!" print htmlDammit(french) #“Sacré bleu!“

	print demoronise(french) #"Sacr� bleu!"
	print htmlDammit(french, 1) #“Sacr� bleu!“

	frenchu = u'sacré bleu'
	print asciiDammit(frenchu) #sacre bleu

	dejavu = u'Déjà Vu'
	print asciiDammit(dejavu) #Deja Vu

##Sources: http://www.cs.tut.fi/~jkorpela/latin1/all.html http://www.webreference.com/html/reference/character/isolat1.html

  • 1.0 Initial Release (2004-11-28)
  • 1.1 Fixed handling of unicode strings (2012-01-15) - Tom Najdek

##License The author hereby irrevocably places this work in the public domain. To the extent that this statement does not divest the copyright, the copyright holder hereby grants irrevocably to every recipient all rights in this work otherwise reserved under copyright.

About

Stupid library to turn MS chars (like smart quotes) and ISO-Latin chars into ASCII, dammit. Will do plain text approximations, or more accurate HTML representations. Can also be jiggered to just fix the smart quotes and leave the rest of ISO-Latin alone.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages