OpenM++ runtime library (libopenm)
openm::IUtf8Converter Class Referenceabstract

UTF-8 converter public interface. More...

Inheritance diagram for openm::IUtf8Converter:

Public Member Functions

virtual ~IUtf8Converter (void) noexcept=0
 release convertor resources.
 
virtual string next (long long i_size, const char *i_text)=0
 convert next portion of input text bytes into UTF-8 string.
 

Static Public Member Functions

static IUtf8Convertercreate (CharCvtFrom i_from, const char *i_codePageName=nullptr)
 create new converter instance by specified conversion type. More...
 

Detailed Description

UTF-8 converter public interface.

Member Function Documentation

◆ create()

IUtf8Converter * IUtf8Converter::create ( CharCvtFrom  i_from,
const char *  i_codePageName = nullptr 
)
static

create new converter instance by specified conversion type.

Parameters
[in]i_fromconversion source encoding name, ie: utf16Le.
[in]i_codePageNameif conversion type is explicitPage then code page (encoding name) must be specified, ie: English_US.1252
Returns
new converter instance or throw exception if conversion not supported.
Exceptions
HelperExceptionthrow exception if conversion not supported.

Windows: conversion from UTF-32 not supported for Windows and throws exception.
Linux: conversion throws exception if encoding not supported or iconv return an error.


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