{"id":26758177,"url":"https://github.com/jjcakes/utf8clean","last_synced_at":"2025-03-28T16:18:39.215Z","repository":{"id":284403452,"uuid":"954834750","full_name":"jjcakes/utf8clean","owner":"jjcakes","description":"Postgres plpgsql function to clean mixed-character strings of non-UTF8 characters ","archived":false,"fork":false,"pushed_at":"2025-03-25T17:49:39.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T18:35:38.656Z","etag":null,"topics":["data-cleaning","database-tools","encoding","postgres","utf-8"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjcakes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-25T17:28:58.000Z","updated_at":"2025-03-25T18:30:00.000Z","dependencies_parsed_at":"2025-03-25T18:46:33.034Z","dependency_job_id":null,"html_url":"https://github.com/jjcakes/utf8clean","commit_stats":null,"previous_names":["jjcakes/utf8clean"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcakes%2Futf8clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcakes%2Futf8clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcakes%2Futf8clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcakes%2Futf8clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjcakes","download_url":"https://codeload.github.com/jjcakes/utf8clean/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246059336,"owners_count":20717085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-cleaning","database-tools","encoding","postgres","utf-8"],"created_at":"2025-03-28T16:18:38.584Z","updated_at":"2025-03-28T16:18:39.196Z","avatar_url":"https://github.com/jjcakes.png","language":"PLpgSQL","readme":"# utf8clean — PostgreSQL UTF-8 Cleaner Function\n\n## Overview\n`utf8clean` is a robust PostgreSQL function that strips out invalid or non-UTF-8 byte sequences from text fields.  \nIt was built to handle messy external data sources (looking at you, Windows-1252 👀) and ensure stored data is clean, safe, and consistent.\n\n## Why this exists\n- External vendors and data feeds often deliver text with invalid UTF-8 characters.\n- Standard PostgreSQL conversions can fail or truncate.\n- This function inspects each byte, validating against the UTF-8 spec, and only passes allowed sequences.\n\n## Features\n- Written in PL/pgSQL.\n- Strict adherence to UTF-8 rules (including multi-byte sequences).\n- Preserves newline and carriage return characters.\n- Easy to integrate into `INSERT`/`UPDATE` queries.\n- Works on large datasets.\n\n## Installation\nRun the utf8clean.sql in your PostgreSQL instance\n\n## Usage\nJust wrap strings for insert/update in utf8clean(), for example:\n\n```update some_table set some_column = utf8clean('some naughty string');```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjcakes%2Futf8clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjcakes%2Futf8clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjcakes%2Futf8clean/lists"}