xref: /haiku/src/add-ons/kernel/file_systems/fat/encodings.h (revision d4e4909c6a3fe4290b78be2b78035c4774e3ff18)
1 /*
2 	Copyright 1999-2001, Be Incorporated.   All Rights Reserved.
3 	This file may be used under the terms of the Be Sample Code License.
4 */
5 #ifndef _DOSFS_ENCODINGS_H_
6 #define _DOSFS_ENCODINGS_H_
7 
8 
9 #include "system_dependencies.h"
10 
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 status_t unicode_to_utf8(const uchar *uni, uint32 unilen, uint8 *utf8,
17 	uint32 utf8len);
18 
19 bool requires_munged_short_name(const uchar *utf8name,
20                const uchar nshort[11], int encoding);
21 
22 bool requires_long_name(const char *utf8, const uchar *unicode);
23 status_t utf8_to_unicode(const char *utf8, uchar *uni, uint32 unilen);
24 status_t munge_short_name2(uchar nshort[11], int encoding);
25 status_t munge_short_name1(uchar nshort[11], int iteration, int encoding);
26 status_t generate_short_name(const uchar *name, const uchar *uni,
27 		uint32 unilen, uchar nshort[11], int *encoding);
28 
29 status_t msdos_to_utf8(uchar *msdos, uchar *utf8, uint32 utf8len,
30 		uint8 toLower);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif
37