PX_SET_INPUTENCODING(3)

✨ PX_set_inputencoding β€” bestie, let's set the encoding for output ✨

okay so this is PX_set_inputencoding(3) from the Library Functions Manual, and it's genuinely a whole vibe. let's get into it πŸ’–


🌸 SYNOPSIS 🌸

#include <paradox.h>

int PX_set_inputencoding(pxdoc_t *pxdoc, const char *encoding)

πŸ’… DESCRIPTION πŸ’…

so what this one does: it sets the input encoding for all the alpha fields. it gets used when data is stored into a record. that's the whole job. πŸŽ€

the encoding has to be a name β€” like, the actual name as described in the man and info pages of recode or iconv, whichever one is being used. a super common value is latin1 on Unix systems, so if you're on Unix and you don't know what to put, that's the one iykyk. πŸ’«

and here's the tea: if you do not set the encoding, then PX_get_data_alpha(3) will return the field data in the original encoding. but if you do set it, it will recode the field data. so like, setting it changes what you get back. no cap. πŸ”₯

ok important heads up bestie: this function is a short cut form of PX_set_parameter(pxdoc, "inputencoding", encoding) β€” and it is deprecated. 😭 so it still works and all, but it's giving legacy, and you should probably be using the long form instead.

⭐ RETURN VALUE ⭐

  • returns -2 if recoding is not supported πŸ’€
  • returns a value < 0 if there's an error
  • otherwise returns 0 β€” slay, everything's fine 🫢

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service king πŸ«‘πŸ’œ


and that's the whole page fr fr β€” PX_set_inputencoding(3) from the Library Functions Manual, that's the one we just read, top to bottom, no crumbs left. mwah πŸ’‹βœ¨