---
name: "PX_set_inputencoding"
section: "3"
platform: "linux"
package: "pxlib-dev"
version: "0.6.9-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PX_set_inputencoding"
---

# PX\_set\_inputencoding(3)

Set encoding for output

## NAME

PX\_set\_inputencoding — Set encoding for output

## SYNOPSIS

\#include \<paradox.h\>

int PX\_set\_inputencoding(pxdoc\_t \*pxdoc, const char \*encoding)

## DESCRIPTION

Sets the input encoding for all alpha fields. It is used when  data is stored into a record. The encoding must  be a name as it is described by the man and info pages of  **recode** or **iconv** 			whatever is used. A common value is \`latin1' on Unix  systems. If you do not set the encoding the function [PX\_get\_data\_alpha(3)](/PX_get_data_alpha/3.md)  will return field data in the original encoding otherwise it will  recode the field data.

This function is a short cut form PX\_set\_parameter(pxdoc,  "inputencoding", encoding) and is deprecated.

## RETURN VALUE

Returns -2 if recoding is not supported and a value \< 0 in case of  an error, otherwise 0.

## SEE ALSO

**PX\_set\_data\_alpha(3)**,  **[PX\_set\_targetencoding(3)](/PX_set_targetencoding/3.md)**,  **[PX\_set\_parameter(3)](/PX_set_parameter/3.md)**,  [iconv(1)](/iconv/1.md), [recode(1)](/recode/1.md)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
