page_util_quote(n)
π page_util_quote(n) β page character quoting utilities π
okay bestie, so this one lives in the <pink>page</pink> section of the manual (it's page_util_quote(n), manual page number one, iconic) and it's literally just a lil' toolkit of character-quoting helpers. nothing scary, i promise. let's get into it π«Ά
β¨ SYNOPSIS β¨
package require page::util::quote ?0.2?
package require snit
::page::util::quote::unquote char
::page::util::quote::quote'tcl char
::page::util::quote::quote'tclstr char
::page::util::quote::quote'tclcom char
so yeah, you pull in the package (version ?0.2?, optional-ish), you also need snit, and then you've got four lil' commands to play with. that's the whole vibe check π
πΈ DESCRIPTION πΈ
this package is giving utility commands and nothing else β it hands you a few commands that convert characters into various forms. that's it. that's the whole job. lowkey perfect, no cap. β¨
π API π
okay here's the main character section, the four commands, one by one:
::page::util::quote::unquote charβ takes a character as it's stored in an abstract syntax tree by a PEG processor (peep the packagesgrammar::peg::interpreter,grammar::me, and their relations β iykyk), i.e. in some quoted form, and converts it into the equivalent Tcl character. the character comes back as the result of the command. so it's the un-quoting girlie π::page::util::quote::quote'tcl charβ takes a Tcl character (internal representation, fr fr) and converts it into a string that the Tcl parser will accept, that will regenerate the character in question, and that is 7bit ASCII. the string is returned as the result of this command. it's giving β¨safe and boring in the best wayβ¨::page::util::quote::quote'tclstr charβ takes a Tcl character (internal representation) and converts it into a string that the Tcl parser accepts and that generates a human readable representation of the character. the string comes back as the result of the command.
heads up bestie: this string does not use any unprintable characters. it may use backslash-quoting. high UTF characters get quoted to dodge problems with the still prevalent ascii terminals (we're all still living in ascii-land, unfortunately π). and it's assumed the string will be used in a double-quoted environment. note that. remember that. periodt. π
::page::util::quote::quote'tclcom charβ takes a Tcl character (internal representation) and converts it into a string that the Tcl parser accepts when used within a Tcl comment. the string is returned as the result of this command. yes queen, comment-safe quoting, we love a niche specialty π
π BUGS, IDEAS, FEEDBACK π
ngl, this document and the package it describes will undoubtedly contain bugs and other problems. like, no shade, it's just how it is. so please report them in the category page of the Tcllib Trackers:
http://core.tcl.tk/tcllib/reportlist
also please report any ideas for enhancements you may have for either the package and/or the documentation. we want the glow-up β¨
when proposing code changes, please provide unified diffs, i.e. the output of diff -u. don't be mysterious about it π
and note further that attachments are strongly preferred over inlined patches. attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. okay that's very specific but like, that's the instructions, so π«Ά
π KEYWORDS π
page, parser generator, quoting, text processing
π CATEGORY π
Page Parser Generator
π COPYRIGHT π
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page bestie!! this beauty is tcllib version 1.0 and it ate, no crumbs left ππ mwah, go quote some characters, you got this β¨π§π
π¦ where this page comes from
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms