https://github.com/truthly/pg-emoji Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories - + Security - * Team * Enterprise * Explore + Explore GitHub - Learn & contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Nonprofit - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} truthly / pg-emoji * Watch 2 * Star 32 * Fork 0 PostgreSQL emoji encode/decode extension MIT License 32 stars 0 forks Star Watch * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights master 1 branch 0 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/t] Use Git or checkout with SVN using the web URL. [gh repo clone truthl] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @joelonsql joelonsql Initial commit ... 3586080 Jan 21, 2021 Initial commit 3586080 Git stats * 1 commit Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time FUNCTIONS Initial commit Jan 21, 2021 TABLES Initial commit Jan 21, 2021 expected Initial commit Jan 21, 2021 results Initial commit Jan 21, 2021 sql Initial commit Jan 21, 2021 LICENSE Initial commit Jan 21, 2021 Makefile Initial commit Jan 21, 2021 README.md Initial commit Jan 21, 2021 complain_header.sql Initial commit Jan 21, 2021 emoji--1.0.sql Initial commit Jan 21, 2021 emoji-chars.sql Initial commit Jan 21, 2021 emoji.control Initial commit Jan 21, 2021 fetch-chars.sh Initial commit Jan 21, 2021 View code README.md pg-emoji 1. About 2. API 1. emoji.encode(bytea)-text 2. emoji.decode(text)-bytea 3. emoji.from_text(text)-text 4. emoji.to_text(text)-text 1. About emoji is a pure SQL PostgreSQL extension to encode/decode bytea/text to/from emoji. A lookup-table is constructed from the first 1024 emojis from [https: //unicode.org/Public/emoji/13.1/emoji-test.txt], where each emoji maps to a unique 10 bit sequence. The input data is split into 10 bit fragments, mapped to the corresponding emojis. The first emoji in the result is a header, where the first bit is 1 if the result was zero padded, and the remaining 9 bits is a checksum based on the input data. If the checksum is invalid during decode, NULL is returned. 3. API emoji.encode(bytea)-text SELECT emoji.encode('\x0123456789abcdef'::bytea); encode ---------- (1 row) emoji.decode(text)-bytea SELECT emoji.decode(''); decode -------------------- \x0123456789abcdef (1 row) emoji.from_text(text)-text SELECT emoji.from_text('Hello !'); from_text ------------ (1 row) emoji.to_text(text)-text SELECT emoji.to_text(''); to_text ---------- Hello ! (1 row) About PostgreSQL emoji encode/decode extension Resources Readme License MIT License Releases No releases published Packages 0 No packages published Languages * PLpgSQL 98.7% * Other 1.3% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Help * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.