{"id":28509175,"url":"https://github.com/atomicobject/utf8_to_gsm","last_synced_at":"2025-07-02T23:31:51.837Z","repository":{"id":66257815,"uuid":"2230531","full_name":"atomicobject/utf8_to_gsm","owner":"atomicobject","description":"`Utf8ToGsm` provides functionality to convert UTF-8 characters to their GSM equivalents.","archived":false,"fork":false,"pushed_at":"2011-08-19T15:40:47.000Z","size":107,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-06-08T22:08:12.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/kuleszaj/utf8_to_gsm/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomicobject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-18T21:27:21.000Z","updated_at":"2021-11-28T01:13:47.000Z","dependencies_parsed_at":"2023-02-20T00:55:26.179Z","dependency_job_id":null,"html_url":"https://github.com/atomicobject/utf8_to_gsm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atomicobject/utf8_to_gsm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Futf8_to_gsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Futf8_to_gsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Futf8_to_gsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Futf8_to_gsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomicobject","download_url":"https://codeload.github.com/atomicobject/utf8_to_gsm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Futf8_to_gsm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263232689,"owners_count":23434721,"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":[],"created_at":"2025-06-08T22:07:39.610Z","updated_at":"2025-07-02T23:31:51.786Z","avatar_url":"https://github.com/atomicobject.png","language":"Ruby","readme":"Description\n===========\n`Utf8ToGsm.to_gsm` provides functionality to convert UTF-8 characters (in a string) to their GSM equivalents for sending SMS messages via SMPP.\n\nExamples\n--------\n\n    require 'utf8_to_gsm'\n    Utf8ToGsm.to_gsm('Convert to GSM: !@#$%^\u0026*()')\n    =\u003e \"Convert to GSM: !\\x00#\\x02%\\e\\x14\u0026*()\" \n\nUsage\n-----\n\nProvide `Utf8ToGsm.to_gsm` a UTF-8 string that you would like to convert into a GSM-compatible string.\n\n`Utf8ToGsm` will go through each character in the string:\n\n* If the character has an exact GSM equivalent, it will be used.\n* Otherwise, the UTF-8 character is transliterated to ASCII.\n* If no suitable character(s) is available in ASCII, a replacement symbol (question mark: ?) will be used.\n* Once transliterated to ASCII, the character(s) will be converted to its GSM equivalent. (All ASCII characters are represented in GSM.)\n\nImplementation\n--------------\nAny given UTF-8 character(s) that does not exist in the GSM alphabet is transliterated with the help of `unidecoder` to ASCII.\n\n`unidecoder` is used so that `Utf8ToGsm` can work with Ruby 1.8.7. Much of the functionality of `unidecoder` is provided by Ruby 1.9.2.  However... the need at the time of writing was Ruby 1.8.7.\n\nMotivation\n----------\n\n* `Utf8ToGsm` may be useful for people who need to send SMS messages via SMPP directly to an SMSC using the GSM-7 encoding (\"Default SMSC Alphabet\"), data_coding = 0x00.\n* Transliteration used by this library is meant to provide the best possible ASCII replacement that is available for the given UTF-8 characters. It may be helpful to review the readme from [unicoder](https://github.com/norman/unidecoder/blob/master/README.md).\n* Clearly, transliteration is not ideal.  However, the GSM-7 default alphabet (\"Default SMSC Alphabet\") only allows a total of 127 characters, and so a very limited character repertoire is available.\n* It is presumed that providing the closest possible replacement is better than providing nothing at all.\n* For example, if a user tries to send an SMS message via SMPP containing the character \"À\", there is a problem.  \"À\" does not exist in the GSM-7 default alphabet. Sending \"A\" as a replacement instead of \"?\" is probably more helpful to the recipient.\n* For a truly accurate representation, UTF-16 or UCS-2 should generally be used for transmitting the payload of an SMPP PDU to the SMSC when non-GSM characters are being communicated.  However, not all telcos or SMSC's support UTF-16/UCS-16.\n* Theoretically, GSM locking shift tables and GSM single shift tables should be usable to represent characters outside of the GSM-7 default alphabet.  However, it seems that telco support for this (especially via SMPP) is very limited.\n\nAuthors\n=======\n* Justin Kulesza (kulesza@atomicobject.com)\n\n© 2011 [Atomic Object](http://www.atomicobject.com/)\n\nMore Atomic Object [open source](http://www.atomicobject.com/pages/Software+Commons) projects\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicobject%2Futf8_to_gsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomicobject%2Futf8_to_gsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicobject%2Futf8_to_gsm/lists"}