xref: /haiku/src/add-ons/kernel/file_systems/fat/encodings.h (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
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 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 status_t unicode_to_utf8(const uchar *uni, uint32 unilen, uint8 *utf8,
13 	uint32 utf8len);
14 
15 bool requires_munged_short_name(const uchar *utf8name,
16                const uchar nshort[11], int encoding);
17 
18 bool requires_long_name(const char *utf8, const uchar *unicode);
19 status_t utf8_to_unicode(const char *utf8, uchar *uni, uint32 unilen);
20 status_t munge_short_name2(uchar nshort[11], int encoding);
21 status_t munge_short_name1(uchar nshort[11], int iteration, int encoding);
22 status_t generate_short_name(const uchar *name, const uchar *uni,
23 		uint32 unilen, uchar nshort[11], int *encoding);
24 
25 status_t msdos_to_utf8(uchar *msdos, uchar *utf8, uint32 utf8len,
26 		uint8 toLower);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 #endif
33