Václav Slavík
8d94819c43
Remove wxUSE_WCHAR_T checks.
...
wxWidgets requires wchar_t for some time now; wx/chartype.h has a check
to fail complation without it. Simplify code by removing now-dead code
for the !wxUSE_WCHAR_T case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 10:43:18 +00:00
Vadim Zeitlin
961326054f
Minor corrections to ToWChar() comment.
...
Don't refer to the non-existent outputBuf parameter and don't imply that the
value of dstLen matters to decide whether we really convert or not -- only
whether dst pointer itself is NULL or not does.
See #11486 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-06 02:29:56 +00:00
Vadim Zeitlin
40ac5040ce
Add convenient wxMBConv::cMB2WC/WC2MB overloads taking buffers.
...
These overloads allow not to worry about buffer lengths and just convert
between wxCharBuffer and wxWCharBuffer directly in a convenient way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-12 22:40:25 +00:00
Václav Slavík
6df09f32fd
added length to wx(Scoped)CharBuffer to improve handling of embedded NULs
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-29 20:58:39 +00:00
Vadim Zeitlin
c0c133e13b
add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Vadim Zeitlin
5c69ef61f3
fix some of icc 11.0 warnings and disable a few others
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-16 14:24:13 +00:00
Stefan Csomor
0b6a49c21f
forward define for non precomp build, switching preproc constants for consistency
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-05 19:02:51 +00:00
Vadim Zeitlin
a08a37d0d6
no changes, just added some explanatory comments for wxCSConv members
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-19 01:37:43 +00:00
Vadim Zeitlin
f6a0208756
fix the output length returned from cWC2MB/MB2WC() to be consistent with From/ToWChar(); fix off by NUL-length bug in wxMBConv implementation of From/ToWChar() in terms of legacy WC2MB/MB2WC() (which are still used in wxMBConv_wxwin) that this uncovered; added a simple test for the bugs the old code resulted in which could be easily seen with wxConvISO8859_1 (see #9739 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-15 23:57:25 +00:00
Vadim Zeitlin
05392dc8c6
remove wxCSConv::MB2WC/WC2MB, implement Latin-1 fallback conversion in To/FromWChar() themselves; this is more efficient and removing the old code fixes off by 1 bugs in it (related to #9739 )
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-15 16:09:00 +00:00
Vadim Zeitlin
1bc8210593
compilation fix for VC6 (and maybe not only): enums defined in containing class are not accessible from the nested classes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-06 21:06:16 +00:00
Vadim Zeitlin
9d653e810c
rewrote UTF-7 to work on streams of data to be comaptible with the way wxTextStream uses the converters; also converted a couple off by 1 bugs and unit test finally pass now
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-01 03:08:45 +00:00
Vadim Zeitlin
9b4da62701
PalmOS compilation fixes (wx-trunk-out.diff part of patch 1894861)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-02 00:43:06 +00:00
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