> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/readme/annotated/class_code_converter.md).

# CodeConverter

[Public Types](#pub-types) | [Public Member Functions](#pub-methods)

`#include <`[codeconverter.h](/adk-5.0-programmers-guide/codeconverter_8h_source.md)`>`

|              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Public Types |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| enum         | <p><a href="#afb0564821f132bfe74508af8349a0faa">Encoding</a> {<br>  <a href="#afb0564821f132bfe74508af8349a0faaa877d60443644fbd25a1a582fb4be1102">Enc\_None</a> = 0, <a href="#afb0564821f132bfe74508af8349a0faaab344ef64ff97bde2a5be0a6060614c9c">Enc\_Latin1</a> = 1, <a href="#afb0564821f132bfe74508af8349a0faaaf951452b08eae4d39b9395f76b8565db">Enc\_Latin2</a> = 2, <a href="#afb0564821f132bfe74508af8349a0faaac6301e7a781fe47ba09bf7e05b32ad6b">Enc\_Latin3</a> = 3,<br>  <a href="#afb0564821f132bfe74508af8349a0faaaf46eef9e3727c051112a527facf09fee">Enc\_Latin4</a> = 4, <a href="#afb0564821f132bfe74508af8349a0faaa857ba98dd24383f0390224be7a3c9df0">Enc\_Cyrillic</a> = 5, <a href="#afb0564821f132bfe74508af8349a0faaa18b99fc8bb4bbf026ab9ae72bb133847">Enc\_Arabic</a> = 6, <a href="#afb0564821f132bfe74508af8349a0faaae40e974acb89116fdc71488325ce7f9a">Enc\_Greek</a> = 7,<br>  <a href="#afb0564821f132bfe74508af8349a0faaabb4c36a4b2b3f00af4d755383bc5ae3c">Enc\_Hebrew</a> = 8, <a href="#afb0564821f132bfe74508af8349a0faaa81d9e8b57d581b2d2c3f76e535591e7e">Enc\_Latin5</a> = 9, <a href="#afb0564821f132bfe74508af8349a0faaa4b1e26b2b2fd6cb1090c5fd11c3840bc">Enc\_Latin6</a> = 10, <a href="#afb0564821f132bfe74508af8349a0faaaddacdc98cc86f1701b7b50ab62994153">Enc\_Last</a> = 11<br>}</p> |

|                         |                                                                                                                                     |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Public Member Functions |                                                                                                                                     |
|                         | [CodeConverter](#ae8e933c33bffd2eb397bee86901bf745) ()                                                                              |
| virtual                 | [\~CodeConverter](#a471966e9acdf521904a3d9cf7611d590) ()                                                                            |
| std::string             | [string2utf](#a9d6ec9bef4ea9e9722b25ab6c8ae1fe8) (const std::string \&str, enum [Encoding](#afb0564821f132bfe74508af8349a0faa) enc) |

### MemberEnumeration Documentation <a href="#member-enumeration-documentation" id="member-enumeration-documentation"></a>

### Encoding <a href="#afb0564821f132bfe74508af8349a0faa" id="afb0564821f132bfe74508af8349a0faa"></a>

enum \[Encoding]\(#afb0564821f132bfe74508af8349a0faa)

|               |                                                        |
| ------------- | ------------------------------------------------------ |
| Enumerator    |                                                        |
| Enc\_None     | No encoding, can be used to check valid encoding range |
| Enc\_Latin1   | ISO-8859-1 (latin-1)                                   |
| Enc\_Latin2   | ISO-8859-2 (latin-2)                                   |
| Enc\_Latin3   | ISO-8859-3 (latin-3)                                   |
| Enc\_Latin4   | ISO-8859-4 (latin-4)                                   |
| Enc\_Cyrillic | ISO-8859-5 (Cyrillic)                                  |
| Enc\_Arabic   | ISO-8859-6 (Arabic)                                    |
| Enc\_Greek    | ISO-8859-7 (Greek)                                     |
| Enc\_Hebrew   | ISO-8859-8 (Hebrew)                                    |
| Enc\_Latin5   | ISO-8859-9 (latin-5)                                   |
| Enc\_Latin6   | ISO-8859-10 (latin-6)                                  |
| Enc\_Last     | No encoding, can be used to check valid encoding range |

### Constructor& Destructor Documentation

### CodeConverter() <a href="#ae8e933c33bffd2eb397bee86901bf745" id="ae8e933c33bffd2eb397bee86901bf745"></a>

[CodeConverter](/adk-5.0-programmers-guide/readme/annotated/class_code_converter.md)

inline

### \~CodeConverter() <a href="#a471966e9acdf521904a3d9cf7611d590" id="a471966e9acdf521904a3d9cf7611d590"></a>

virtual \\\~[CodeConverter](/adk-5.0-programmers-guide/readme/annotated/class_code_converter.md)

inlinevirtual

### MemberFunction Documentation <a href="#member-function-documentation" id="member-function-documentation"></a>

### string2utf() <a href="#a9d6ec9bef4ea9e9722b25ab6c8ae1fe8" id="a9d6ec9bef4ea9e9722b25ab6c8ae1fe8"></a>

string string2utf

converts an string (encoded with Encoding `enc`) to UTF-8

**Parameters**

\[in] **str** encoded string \[in] **enc** Encoding of string str

#### Returns

UTF-8 string, an empty string in case of error (wrong value for `enc`)

***

The documentation for this class was generated from the following files:

* sdi/src/[codeconverter.h](/adk-5.0-programmers-guide/codeconverter_8h_source.md)
* sdi/src/[codeconverter.cpp](/adk-5.0-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/codeconverter_8cpp.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/readme/annotated/class_code_converter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
