Giter Site home page Giter Site logo

mzkaramat / ascii--dammit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tnajdek/ascii--dammit

0.0 2.0 0.0 96 KB

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.

Python 100.00%

ascii--dammit's Introduction

#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.

ascii--dammit's People

Contributors

tnajdek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.