root/headers/private/fs_shell/fssh_convertutf.h
/*
 * Copyright 2014 Jonathan Schleifer <js@webkeks.org>
 * Copyright 2014 Haiku, Inc. All rights reserved.
 *
 * Distributed under the terms of the MIT License.
 *
 * Authors:
 *              Jonathan Schleifer, js@webkeks.org
 *              John Scipione, jscipione@gmail.com
 */
#ifndef FSSH_CONVERT_UTF_H
#define FSSH_CONVERT_UTF_H

#include "fssh_api_wrapper.h"

#ifdef __cplusplus
extern "C"
{
#endif


ssize_t fssh_utf16le_to_utf8(const uint16_t* source, size_t sourceCodeUnitCount, char* target,
        size_t targetLength);

ssize_t fssh_utf16be_to_utf8(const uint16_t* source, size_t sourceCodeUnitCount, char* target,
        size_t targetLength);

ssize_t fssh_utf8_to_utf16le(const char* source, size_t* sourceLength, uint16_t* target,
        size_t targetUnits, uint16_t* surrogateOverflow, bool nullTerminate);

ssize_t fssh_utf8_to_utf16be(const char* source, size_t* sourceLength, uint16_t* target,
        size_t targetUnits, uint16_t* surrogateOverflow, bool nullTerminate);


#ifdef __cplusplus
};
#endif


#endif  // CONVERT_UTF_H