2013-12-29 04:53:12 +00:00
|
|
|
/*
|
2016-03-25 19:59:40 +00:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2013-12-29 04:53:12 +00:00
|
|
|
*/
|
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
#ifndef GUAC_RDP_UNICODE_H
|
|
|
|
#define GUAC_RDP_UNICODE_H
|
2014-01-01 22:44:28 +00:00
|
|
|
|
2013-07-26 18:27:11 +00:00
|
|
|
/**
|
|
|
|
* Convert the given number of UTF-16 characters to UTF-8 characters.
|
2016-03-01 05:50:00 +00:00
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param utf16
|
|
|
|
* Arbitrary UTF-16 data.
|
|
|
|
*
|
|
|
|
* @param length
|
|
|
|
* The length of the UTF-16 data, in characters.
|
|
|
|
*
|
|
|
|
* @param utf8
|
|
|
|
* Buffer to which the converted UTF-8 data will be written.
|
|
|
|
*
|
|
|
|
* @param size
|
|
|
|
* The maximum number of bytes available in the UTF-8 buffer.
|
2013-07-26 18:27:11 +00:00
|
|
|
*/
|
2013-12-11 23:00:00 +00:00
|
|
|
void guac_rdp_utf16_to_utf8(const unsigned char* utf16, int length,
|
|
|
|
char* utf8, int size);
|
2013-07-26 18:27:11 +00:00
|
|
|
|
2013-08-06 05:23:30 +00:00
|
|
|
/**
|
|
|
|
* Convert the given number of UTF-8 characters to UTF-16 characters.
|
2016-03-01 05:50:00 +00:00
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param utf8
|
|
|
|
* Arbitrary UTF-8 data.
|
|
|
|
*
|
|
|
|
* @param length
|
|
|
|
* The length of the UTF-8 data, in characters.
|
|
|
|
*
|
|
|
|
* @param utf16
|
|
|
|
* Buffer to which the converted UTF-16 data will be written.
|
|
|
|
*
|
|
|
|
* @param size
|
|
|
|
* The maximum number of bytes available in the UTF-16 buffer.
|
2013-08-06 05:23:30 +00:00
|
|
|
*/
|
2013-12-11 23:00:00 +00:00
|
|
|
void guac_rdp_utf8_to_utf16(const unsigned char* utf8, int length,
|
|
|
|
char* utf16, int size);
|
2013-08-06 05:23:30 +00:00
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
#endif
|
|
|
|
|