current location: Home > download site > Library download > Other libraries > ANSI to HTML5 library
ANSI to HTML5 library
Classify: Library download / Other libraries | Release time: 2017-12-20 | visits: 1248 |
Download: 69 |
Latest Downloads
Fantasy Aquarium
Girls Frontline
Wings of Stars
Little Flower Fairy Fairy Paradise
Restaurant Cute Story
Shanhe Travel Exploration
Love and Producer
The most powerful brain 3
Odd Dust: Damila
Young Journey to the West 2
24 HoursReading Leaderboard
- 1 Dead Rising Deluxe Remaster: How to take 1,000 PP humorous shot for Kent's photo challenge
- 2 Objects in JavaScript
- 3 Top Free APIs You Should Know
- 4 Scaling Node.js with the Cluster Module
- 5 How to synchronize your contacts with your phone? Implemeting CardDAV in Go!
- 6 New Values and Functions in CSS
- 7 EchoAPI vs Insomnia: A Comprehensive Comparison with Practical Examples
- 8 Dead Rising Deluxe Remaster shortcut guide: how to unlock Wonderland and Tunnels shortcut
- 9 Introducing JDK Java Developers Ultimate Upgrade with Advanced AI Enhancements
- 10 Dead Rising Deluxe Remaster: All Survivors and where to find them
- 11 Tips for testing queued jobs in Laravel
- 12 Ripple-Associated Wallet Moves 100 Million XRP Amid Legal Heat
- 13 Bitcoin (BTC) Price Crosses $62,000 as 88% of HODLers Sit on Paper Profits
- 14 How to Fix Tailwind CSS Not Working in Next.js
- 15 Meme Coin Market Heats Up as Dogecoin (DOGE), Shiba Inu (SHIB), and Popcat (POPCAT) Rally
Latest Tutorials
-
- Go language practical GraphQL
- 1634 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 3051 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 1529 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2381 2024-03-29
<?php namespace SensioLabs\AnsiConverter\Tests; use SensioLabs\AnsiConverter\AnsiToHtmlConverter; class AnsiToHtmlConverterTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getConvertData */ public function testConvert($expected, $input) { $converter = new AnsiToHtmlConverter(); $this->assertEquals($expected, $converter->convert($input)); } public function getConvertData() { return array( // text is escaped array('<span style="background-color: black; color: white">foo <br /></span>', 'foo <br />'), // newlines are preserved array("<span style=\"background-color: black; color: white\">foo\nbar</span>", "foo\nbar"), // backspaces array('<span style="background-color: black; color: white">foo </span>', "foobar\x08\x08\x08 "), array('<span style="background-color: black; color: white">foo</span><span style="background-color: black; color: white"> </span>', "foob\e[31;41ma\e[0mr\x08\x08\x08 "), // color array('<span style="background-color: darkred; color: darkred">foo</span>', "\e[31;41mfoo\e[0m"), // color with [m as a termination (equivalent to [0m]) array('<span style="background-color: darkred; color: darkred">foo</span>', "\e[31;41mfoo\e[m"), // bright color array('<span style="background-color: red; color: red">foo</span>', "\e[31;41;1mfoo\e[0m"), // carriage returns array('<span style="background-color: black; color: white">foobar</span>', "foo\rbar\rfoobar"), // underline array('<span style="background-color: black; color: white; text-decoration: underline">foo</span>', "\e[4mfoo\e[0m"), // non valid unicode codepoints substitution (only available with PHP >= 5.4) PHP_VERSION_ID < 50400 ?: array('<span style="background-color: black; color: white">foo '."\xEF\xBF\xBD".'</span>', "foo \xF4\xFF\xFF\xFF"), ); } }
ANSI is a character code. In order to enable the computer to support more languages, 1 byte in the range of 0x00~0x7f is usually used to represent 1 English character. Anything outside this range is encoded using 0x80~0xFFFF, which is extended ASCII encoding.
HTML is Hypertext Markup Language, an application under Standard Universal Markup Language. "Hypertext" means that the page can contain pictures, links, and even non-text elements such as music and programs. The structure of hypertext markup language includes a "head" part (English: Head) and a "body" part (English