Commit Graph

129 Commits

Author SHA1 Message Date
Václav Slavík
c643a97740 fixed wxEncodingConverter-base wxCSConv to report failures as expected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-16 11:58:56 +00:00
Václav Slavík
b1d547ebc5 made wxMBConv_iconv MT-safe
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-14 10:52:17 +00:00
Włodzimierz Skiba
6356d52a67 Unfortunatelly compiler does not know which bits play here and still warns about loosing them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-08 19:34:45 +00:00
Ryan Norton
79c78d4284 correct to int32 for range comparison
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-08 00:34:51 +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
6e394fc623 cast fix, workaround for pickeir compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-05 16:33:47 +00:00
Stefan Csomor
c543817b32 wxMax instead of max, former is always around
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-02 09:36:13 +00:00
Stefan Csomor
db696b6238 correcting allocated buffer size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-02 09:03:35 +00:00
Jouk Jansen
7c8fad40bf Committing in .
Patches for OpenVMS

 Modified Files:
 	wxWidgets/src/common/descrip.mms
 	wxWidgets/src/common/strconv.cpp
----------------------------------------------------------------------


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-02 08:31:08 +00:00
Ryan Norton
638357a03e rewrite core foundation conversion to be efficient, double-pass mac WC2MB to verify that there were no invalid characters converted, set amount of memory to allocate to 32 for mac conversion to prevent needless large buffer allocations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-01 18:03:04 +00:00
Ryan Norton
fd5e476dbb note broken code, cast hack to fix warning on pickier compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-31 06:23:16 +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
Ryan Norton
15f2ee3270 [ 1054664 ] Implementation of wxMBConvUTF7 (Heavily modified in places), utf7 unit tests change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-29 22:10:26 +00:00
Ryan Norton
03ff8fda8d Add wxString::WorstEncodingCase, other various cleanups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-29 21:06:28 +00:00
Ryan Norton
854451e2f8 have wxbuiltin wxmbconvutf7 return -1 (error) not 0. Some cleanups in string.cpp. Add some unit tests for utf7 and cleanups.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-29 11:13:41 +00:00
Ryan Norton
72606b430e increase worst case for UTF8 to *4
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-28 23:05:47 +00:00
Włodzimierz Skiba
2c53a80a09 Reverted due to Darwin conflict.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-12 20:47:04 +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
Ryan Norton
f7e98dee7e cocoa doesn't need system framework - string conversion for cocoa - focus for cocoa - a bit of change for string unit tests for new functionality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-11 02:02:30 +00:00
Włodzimierz Skiba
907173e51d 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@29682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-06 20:21:57 +00:00
Włodzimierz Skiba
d775fa8235 Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxNOT_FOUND/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-22 14:38:52 +00:00
Vadim Zeitlin
02272c9c3e default MB -> WC conversion under Win32 now fails if it encounters invalid MB chars; this is more iconv-compatible and fixes wxTextInputStream::NextChar()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-11 18:47:13 +00:00
Stefan Csomor
f81f59012d metrowerks is not implementing the mb calls in libc correctly (always needs correct length param), so we switch to our own conversion code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-24 19:30:13 +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
Włodzimierz Skiba
7608a6837f Limited setup.h shouldn't break building. Helpful in bringing new ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-18 12:29:55 +00:00
Václav Slavík
635f33cedd fixed wxMBConv::cMB2WC and cWC2MB to check for conversion failure
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-04-11 09:47:31 +00:00
Stefan Csomor
8471ea9033 fix for always terminating intermediate UniChar String for 4 bytes wchar_t
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-07 16:45:38 +00:00
Stefan Csomor
4227afa4f7 byte length for interim UniChar String corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-07 14:54:21 +00:00
Stefan Csomor
f3a355ceb3 added conversions via UniChar for wchar = 4 bytes versions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-03 09:24:02 +00:00
Vadim Zeitlin
13dd924a3f fail WC2MB conversion in wxCSConv if we can't be sure that we don't lose information
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-15 15:44:07 +00:00
Stefan Csomor
5c250a1033 corrections for buffers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-08 09:53:50 +00:00
Stefan Csomor
8057c6d68f moved system-fontencoding conversions to fontutil.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-01-22 18:41:58 +00:00
Stefan Csomor
335d31e007 string conversion implemented for mac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-01-20 18:20:44 +00:00
Václav Slavík
4d312c222e fixed wxConvLocal to work with C locale (and probably some others)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-09 12:27:42 +00:00
Václav Slavík
a58d4f4d49 prevent deadlock in wxCSConv::DoCreate if it fails for wxConvLocal -- ugly but works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-09 12:09:13 +00:00
Vadim Zeitlin
c547282d5e use iconv() for wxCSConv constructed from a wxFontEncoding; don't use wxFontMapper unless really needed; when it is used, don't use it interactively
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-24 21:50:00 +00:00
Václav Slavík
246428310e fixed iso-8859-1 handling to report failures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-24 19:25:48 +00:00
Vadim Zeitlin
999836aaca warning fixes for BCC and OW (heavily modified patch 819146)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-16 10:28:15 +00:00
Vadim Zeitlin
d8cf2b8d7d made UTF-16/32 equivalent to the corresponding LE/BE version (patch 812358)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-27 13:13:22 +00:00
Vadim Zeitlin
03a991bc7a always return length of the string, *not* size of the buffer from wxMBConv_win32::MB<->WC(), as documented (fixes bug reported in patch 789039)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-26 18:15:09 +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
dcc8fac0c3 fix for Unix compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-23 22:22:27 +00:00
Vadim Zeitlin
b5153fd845 fixed compilation problems with platforms where wchar_t != ushort
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-23 17:12:43 +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
69b80d287d compilation fix (part of patch 810484)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-22 12:23:39 +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
Mattia Barbon
e4ffab299a Compilation fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-20 13:34:49 +00:00
Vadim Zeitlin
c45708e75d fixed bug in wxCSConv(encoding) ctor (which I just added)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-19 22:35:59 +00:00