mconv_decode(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

mconv_decode β€” bestie, this is the one that takes your bytes and turns them into an M-text πŸ’– (it's in section 3m17n of the m17n Library, iykyk)


πŸŽ€ SYNOPSIS πŸŽ€

MText* mconv_decode (MConverter * converter, MText * mt)

🌸 DESCRIPTION 🌸

Okay so picture this: you've got a byte sequence and you want it to become an M-text. That's literally the whole vibe. The mconv_decode() function decodes a byte sequence and appends the result at the end of M-text mt β€” like, it doesn't overwrite anything, it just adds on at the end, no cap.

And where does the source byte sequence come from, you ask? Bestie, it's taken from either:

  • the buffer area, or
  • the stream

…whichever one is currently bound to converter. So it's not out here guessing, it uses whatever you already hooked up to that converter. πŸ’…


🫢 RETURN VALUE 🫢

  • If the operation was successful, mconv_decode() returns the updated mt. Slay. ✨
  • Otherwise it returns NULL and assigns an error code to the external variable merror_code. 😭 (check it, bestie, don't just ignore it)

πŸ’€ ERRORS πŸ’€

  • MERROR_IO
  • MERROR_CODING

Those are the two it can throw at you. Periodt.


πŸ¦‹ SEE ALSO πŸ¦‹

  • mconv_rebind_buffer()
  • mconv_rebind_stream()
  • mconv_encode()
  • mconv_encode_range()
  • mconv_decode_buffer()
  • mconv_decode_stream()

Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


And that's the whole page, bestie πŸŽ€ this was Version 1.8.4, dated Mon Sep 25 2023, from the m17n Library β€” mwah, go decode something iconic πŸ’œπŸŒˆ

πŸ“¦ where this page comes from