* No longer writes to the message data from clipboard. * some cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15153 a95241bf-73f2-0310-859d-f6bbb57e9c96
38 lines
837 B
C++
38 lines
837 B
C++
/*
|
|
* Copyright (c) 2001-2005, Haiku, Inc.
|
|
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
|
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
|
* Distributed under the terms of the MIT license.
|
|
*/
|
|
#ifndef CODECONV_H
|
|
#define CODECONV_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
#include "Coding.h"
|
|
|
|
#define BEGINS_CHAR(byte) ((byte & 0xc0) >= 0x80)
|
|
|
|
class CodeConv {
|
|
public:
|
|
CodeConv();
|
|
~CodeConv();
|
|
|
|
int32 UTF8GetFontWidth(const char *string);
|
|
|
|
/* internal(UTF8) -> coding */
|
|
int32 ConvertFromInternal(const char *src, int32 bytes, char *dst, int coding);
|
|
|
|
/* coding -> internal(UTF8) */
|
|
int32 ConvertToInternal(const char *src, int32 bytes, char *dst, int coding);
|
|
|
|
private:
|
|
void euc_to_sjis(uchar *buf);
|
|
|
|
unsigned short UTF8toUnicode(const char *utf8);
|
|
|
|
int fNowCoding;
|
|
};
|
|
|
|
#endif /* CODECONV_H */
|