Skip to content

Punycode decoding / encoding in Janet

Notifications You must be signed in to change notification settings

sogaiu/janet-punyishcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

punyishcode

Punycode decoding / encoding in Janet.

Usage

(import punyishcode :as p)

(p/decode "de-jg4avhby1noc0d")
# =>
@"パフィーdeルンバ"

(p/encode "München-Ost")
# =>
@"Mnchen-Ost-9db"

Note: In the example above, the return value for (p/decode ...) may show up as:

@"\xE3\x83\x91\xE3\x83\x95\xE3\x82\xA3\xE3\x83\xBCde\xE3\x83\xAB\xE3\x83\xB3\xE3\x83\x90"

By doing (print _) after evaluating a p/decode form, one is more likely to see the result in a readable fashion.

About

Punycode decoding / encoding in Janet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages