---
name: "mchar_encode"
section: "3m17n"
platform: "linux"
package: "m17n-docs"
version: "1.8.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mchar_encode"
---

# mchar\_encode(3m17n)

## NAME

mchar\_encode -

## SYNOPSIS

unsigned **mchar\_encode** (MSymbol *charset\_name*, int *c*)

## DESCRIPTION

Encode a character code. The **mchar\_encode()** function encodes character code **c** to get a code-point in the charset represented by the symbol **charset\_name**.

## RETURN VALUE

If encoding was successful, **mchar\_encode()** returns the encoded code-point. Otherwise it returns **MCHAR\_INVALID\_CODE**. \

## SEE ALSO

**mchar\_decode()**\

## COPYRIGHT

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\>.
