# Documentation of PL\_put\_term\_from\_chars() and PL\_chars\_to\_term()

**URL:** <https://swi-prolog.discourse.group/t/documentation-of-pl-put-term-from-chars-and-pl-chars-to-term/483>\
**Category:** SWI-Prolog web site and services\
**Created:** [April 3, 2019, 8:47pm UTC](https://swi-prolog.discourse.group/t/documentation-of-pl-put-term-from-chars-and-pl-chars-to-term/483 "2019-04-03T20:47:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [April 4, 2019, 8:19am UTC](https://swi-prolog.discourse.group/t/documentation-of-pl-put-term-from-chars-and-pl-chars-to-term/483/2 "2019-04-04T08:19:35Z")

</div>

Updated. Thanks. Due to historical reasons most of the text handling functions come in three flavours: handling a nul-terminated ISO Latin 1 string, handling the same with a _length_ to allow for nul characters and one with flags that specify the encoding and often type (atom/string/codes/chars), buffering and error handling. That reflects how text handling in Prolog evolved.

I guess new code should use the last family for most of the work. The others won’t be deleted, but it might be a good idea to move them to a dedicated section of the manual at some point.

---

_[View the full topic](https://swi-prolog.discourse.group/t/documentation-of-pl-put-term-from-chars-and-pl-chars-to-term/483)._
