Vadim Zeitlin
d16d0917e4
fix wxMBConvUTF8::cMB2WC/cWC2MB() broken by the introduction of wxMBConvStrictUTF8: as it overrides From/ToWChar(), wxMBConvUTF8 needs to do it (instead of deprecated MB2WC/WC2MB) as well
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-15 00:16:58 +00:00
Vadim Zeitlin
0286d08d14
add wxMBConvStrictUTF8 class implementing just UTF-8 conversion, without support for PUA/octal mappings and use it for wxConvUTF8 as it's simpler and more efficient (~20% faster)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-24 15:01:10 +00:00
Václav Slavík
b5dbe15d0b
added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Václav Slavík
8650108199
don't use implicit wxString->char*/wchar_t* conversion, it will not be available in wxUSE_STL build in the future
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-10 17:42:41 +00:00
Václav Slavík
52de37c78f
1. made CRT wrappers definitions indepenent of wxUSE_UNICODE: both ANSI and Unicode variants are now defined
...
2. split wxcrt.h into wxcrtbase.h with lowlevel compiler-specific definitions and wxcrt.h with ANSI- and Unicode-compatible wx wrappers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-10 17:14:14 +00:00
Václav Slavík
ba98e032a7
implemented wxMBConv::IsUTF8() helper for more classes so that all uses of UTF-8 are detected and optimized in wxString
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-02 12:42:57 +00:00
Václav Slavík
092ee46f03
fixed DLL linking of wxConvLibc etc.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-03 15:35:07 +00:00
Václav Slavík
111d99489d
added code for optimized handling of UTF-8 locales: some string operations are more efficient under it and it's possible to completely compile-out support for other locales if the target system is known to only use UTF-8 locales
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-03 11:05:04 +00:00
Václav Slavík
1e50d914af
made wxConvXXX objects usable at static initialization time
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-02 09:03:03 +00:00
Václav Slavík
e3f6cbd99c
split wxchar.h into several smaller headers
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-19 14:45:38 +00:00
Vadim Zeitlin
69c928ef47
added wxSafeConvertMB2WX/WX2MB() and use them when interfacing with C functions which crash if we pass them NULL pointers
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-11 23:38:42 +00:00
Vadim Zeitlin
a56a1234a5
removed wxABI_TESTS, they're irrelvant in 2.9
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-31 03:40:59 +00:00
Vadim Zeitlin
0f0298b10c
added wxCSConv::IsOk() (patch 1637944)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-18 20:39:10 +00:00
Vadim Zeitlin
1c714a5d07
implement To/FromWchar() as wxCSConv methods, otherwise wxCSConv(wxFONTENCODING_UTF16) didn't work correctly even if the underlying wxMBConvUTF16 did
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-09 16:19:34 +00:00
Vadim Zeitlin
bc4b477910
don't define wxMBFILES for Borland, this breaks compilation with wxUSE_UNICODE_MSLU (bug 1592939) and genereally speaking doesn't make any sense
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-27 21:48:21 +00:00
Vadim Zeitlin
d5bef0a323
added wxConvUI which determines the conversion used for the UI elements and can be changed from the user code
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-11 00:36:24 +00:00
Vadim Zeitlin
0e05227246
no changes, just corrected the comment for wxConvLocal
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-10 21:53:42 +00:00
Vadim Zeitlin
2e2cf78dc1
fixed gcc warnings about not initializing the base class in copy ctor
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-06 17:11:25 +00:00
Vadim Zeitlin
35d11700a5
implemented UTF-16/32 using To/FromWChar() instead of MB2WC/WC2MB for sizeof(wchar_t)==4 platforms too
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-05 23:04:10 +00:00
Vadim Zeitlin
467e04791c
1. use a manifest constant wxNO_LEN instead of -1 for lengths everywhere
...
2. reimplemented UTF-16/32 conversions using To/FromWChar() API instead
of MB2WC/WC2MB for Windows (or rather SIZEOF_WCHAR_T == 2 platforms),
the first tangible result is that reading UTF-32BE text streams now
works too
3. more off by 1 fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-05 22:12:45 +00:00
Vadim Zeitlin
d36c9347ea
added wxMBConv::Clone() to be able to copy conversion objects polymorphically
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-05 16:10:08 +00:00
Vadim Zeitlin
509da4510f
MB2WC/WC2MB are not pure virtual any longer, implement them in terms of To/FromWChar()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-04 13:04:47 +00:00
Vadim Zeitlin
483b0434bf
added new To/FromWChar() API with more reasonable semantics than old MB2WC/WC2MB; for now both coexist and the change is/should be backwards compatible
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-04 12:35:21 +00:00
Vadim Zeitlin
7ef3ab50e9
renamed GetMinMBCharWidth() to GetMBNulLen(), made it public and documented it
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-04 07:49:08 +00:00
Vadim Zeitlin
c1464d9d10
replaced recently added wxMBConv::GetMBNul() with a less clever but better
...
working GetMinMBCharWidth(): the idea is that we can't deal with completely
arbitrary encodings anyhow using the current API as we get confused by NUL
runs in the middle of the string, so instead just deal correctly with normal
multibyte encodings, UTF-16/UCS-2 and UTF-32/UCS-4 which should cover 99.9% of
the cases
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-02 14:59:53 +00:00
Vadim Zeitlin
22886fb3c3
Unix compilation fixes after last commit
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-01 13:38:28 +00:00
Vadim Zeitlin
eec47cc6c4
Described in the comments and documented the semantics of the parameters and
...
return values of wxMBConv methods and tried to make them more consistent. The
only (intentional) backwards incompatible change is that cMB2WC/cWC2MB now
return the length of the converted string in outLen parameter and not length+1
Added wxMBConv::GetMBNul() and use it instead of supposing that all multibyte
strings are always terminated with a single NUL which is wrong for UTF-16/32.
Using GetMBNul(), completely rewrote cMB2WC/cWC2MB() to accept a string of the
specified length, whether it is NUL-terminated or not. This means that they
don't overwrite the provided buffer any more and convert the entire string in
all cases.
Fixed bug in wxMBConvUTF16::WC2MB() which didn't NUL-terminate the string
properlyv even if there was enough space.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-01 12:43:03 +00:00
Mart Raudsepp
8907154c1a
Nuke #pragma implementation/interface's
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Michael Wetherell
8b9e1f439b
Comment typo fixes from Vince Harron
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-08-08 22:05:05 +00:00
Michael Wetherell
845905d588
Move G_FILENAME_ENCODING to wxGTK
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-04-13 20:05:57 +00:00
Robert Roebling
7af29d2ff6
Compilo.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-30 16:47:48 +00:00
Robert Roebling
5576edf8d8
Forgot to commit.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-30 16:29:40 +00:00
Julian Smart
d51305e81e
Sorry, should be a __UNIX__ test
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-30 08:07:51 +00:00
Julian Smart
c3c1a9a9cc
Attempted compile fix
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-30 08:00:45 +00:00
Robert Roebling
ea8ce907e1
Submit patch based on Michael W.'s invalid UTF8
...
to PUA patch. I added UTF8_TO_OCTAL and made
that the default for filename conversion uner
GTK2. More adapation, e.g. to G_FILENAME_ENCODING
need to be done.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-27 17:23:15 +00:00
Vadim Zeitlin
f5a1953b34
added wxConvFileName which is a variable, not define as wxConvFile; added comments explaining what different wxConvXXXs are for
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-24 00:59:08 +00:00
Robert Roebling
2e5c710e90
Make wxConvFile wxConvLibc.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-11 18:31:01 +00:00
Włodzimierz Skiba
16cba29d3a
Warning fixes for MinGW.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-21 18:48:22 +00:00
Stefan Csomor
d5c8817ce5
file name char set string conversions
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-17 15:14:35 +00:00
Ryan Norton
f5fb687186
final cleanup of string conversion with null characters (hopefully :))
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-06 08:23:50 +00:00
Ryan Norton
e4e3bbb447
solution to wxMBConv stuff - make a seperate XX2XX for strings of a specified length, use this in wxString instead of previous worst-case method
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-30 20:16:25 +00:00
Włodzimierz Skiba
e4a4a50b90
Reverted due to Darwin and other conflicts.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-12 20:48:22 +00:00
Włodzimierz Skiba
ecd9653bf3
Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-12 19:29:12 +00:00
Dimitri Schoolwerth
75736a9c81
clarified the parameters of MB2WC and WC2MB a little in the docs/headers
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-10 12:01:59 +00:00
Julian Smart
655719367a
Use old licence name
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e
Name and version changes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Vadim Zeitlin
bda3d86af9
don't do anything non trivial (like creating wxFontMapper) in ctors of global objects
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-26 16:55:53 +00:00
Vadim Zeitlin
bde4baaced
more wxMBConv classes cleanup, define wxConvLibc to use Win32 API under Windows
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-22 20:29:15 +00:00
Vadim Zeitlin
e95354ec54
added UTF-16/32-[LB]E conversions; got rid of wxCharacterSet and simplified and fixed some bugs in remaining code
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-22 17:11:56 +00:00
Vadim Zeitlin
c91830cb4b
added conversions to/from UTF 16/32 LE/BE (patch 809685)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-22 00:12:10 +00:00