git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22223
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-inline wxString stc2wx(const char* str, size_t len) {
- return wxString(str, wxConvUTF8, len);
+wxString stc2wx(const char* str, size_t len);
+inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
return wxString(str, len);
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
// so figure it out and fix it!
i = 0;
size_t ui = 0;
// so figure it out and fix it!
i = 0;
size_t ui = 0;
unsigned char uch = (unsigned char)s[i];
positions[i++] = tpos[ui];
if (uch >= 0x80) {
unsigned char uch = (unsigned char)s[i];
positions[i++] = tpos[ui];
if (uch >= 0x80) {
//----------------------------------------------------------------------
//----------------------------------------------------------------------
+#if wxUSE_UNICODE
+wxString stc2wx(const char* str, size_t len)
+{
+ char *buffer=new char[len+1];
+ strncpy(buffer, str, len);
+ buffer[len]=0;
+
+ wxString cstr(buffer, wxConvUTF8);
+
+ delete[] buffer;
+ return cstr;
+}
+#endif
+
+
+
-inline wxString stc2wx(const char* str, size_t len) {
- return wxString(str, wxConvUTF8, len);
+wxString stc2wx(const char* str, size_t len);
+inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
return wxString(str, len);
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
-inline wxString stc2wx(const char* str, size_t len) {
- return wxString(str, wxConvUTF8, len);
+wxString stc2wx(const char* str, size_t len);
+inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
return wxString(str, len);
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
// so figure it out and fix it!
i = 0;
size_t ui = 0;
// so figure it out and fix it!
i = 0;
size_t ui = 0;
unsigned char uch = (unsigned char)s[i];
positions[i++] = tpos[ui];
if (uch >= 0x80) {
unsigned char uch = (unsigned char)s[i];
positions[i++] = tpos[ui];
if (uch >= 0x80) {
//----------------------------------------------------------------------
//----------------------------------------------------------------------
+#if wxUSE_UNICODE
+wxString stc2wx(const char* str, size_t len)
+{
+ char *buffer=new char[len+1];
+ strncpy(buffer, str, len);
+ buffer[len]=0;
+
+ wxString cstr(buffer, wxConvUTF8);
+
+ delete[] buffer;
+ return cstr;
+}
+#endif
+
+
+
-inline wxString stc2wx(const char* str, size_t len) {
- return wxString(str, wxConvUTF8, len);
+wxString stc2wx(const char* str, size_t len);
+inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
return wxString(str, len);
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {