summaryrefslogtreecommitdiffstats
path: root/source3/lib/charcnv.c
Commit message (Collapse)AuthorAgeFilesLines
...
* - added LOCALE patch from vorlon@debian.org (Steve Langasek) (bug #122)Andrew Tridgell2003-06-301-0/+24
| | | | | | | - changed --enable-developer debug to use -gstabs as it makes the samba binaries about 10x smaller and is still quite functional for samba debugging (This used to be commit 53bfcd478a193d4def8da872e92d7ed8f46aa4b9)
* reverted locale patch put in by jht (originally from vorlon).Andrew Tridgell2003-06-161-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are lots of things wrong with this patch, including: 1) it overrides a user chosen configuration option 2) it adds lots of complexity inside a loop when a tiny piece of code outside the loop would do the same thing 3) it does no error checking, and is sure to crash on some systems If you want this functionality then try something like this at the end of charset_name(): #ifdef HAVE_NL_LANGINFO if (strcasecmp(ret, "LOCALE") == 0) { const char *ln = nl_langinfo(CODESET); if (ln) { DEBUG(5,("Substituting charset '%s' for LOCALE\n", ln)); return ln; } } #endif then users can set 'display charset = LOCALE' to get the locale based charset. You could even make that the default for systems that have nl_langinfo(). (This used to be commit 382b9b806b1ecd227b1ea247e3825d6848090462)
* Patch from vorlon@debian.org, see bugzilal #122John Terpstra2003-06-151-0/+37
| | | | | | Samba should preferentially use the locale information from the native system, and only fall back on 'display charset' if this is unavailable or unsupported. (This used to be commit 1e445fb4220cdf4700dd9d1850a42746a1065c5a)
* Fix for valgrind - when doing a srvstr_push we must zero fillJeremy Allison2003-06-061-0/+13
| | | | | | | any extra bytes, not clobber region them - otherwise valgrind thinks they are invalid on send() or write(). Jeremy. (This used to be commit 8aa5f7a65c71fb89ed05e71a2465e61385e80c2b)
* - the 8.3 name in BOTH_DIRECTORY_INFO is supposed to be always unicodeAndrew Tridgell2003-06-061-1/+1
| | | | | | | | | (to match win2003 behaviour) - added the STR_TERMINATE_ASCII flag from samba4 so we can get the string termination right for the case where it is supposed to be non-terminated for UCS2 and terminated when ASCII (This used to be commit 791a4cc7cf84eca77116bca00aeb5f95560f6705)
* fixed bug #75; add check for non-zero destlenGerald Carter2003-05-081-1/+1
| | | | (This used to be commit 83bb84f13121267992e78f2d005257932c711f23)
* Another attempt at undoing my bogus patch 1.55.2.19Tim Potter2003-05-081-0/+2
| | | | (This used to be commit 05a684b3be1525aad3589ded9e59c3f012b5ef20)
* Whoops - that wasn't a whitespace syncup after all.Tim Potter2003-05-071-0/+2
| | | | (This used to be commit 42d0414ed244b92b665cb231f6756f60391861dd)
* Whitespace syncup.Tim Potter2003-04-281-4/+0
| | | | (This used to be commit 7fd7af121ee8ba4f9540394f64fe3c78e2e96cd2)
* Patch by Metze to ensure that we always at least initialize our output stringAndrew Bartlett2003-04-231-0/+4
| | | | | | | | for rpc_pull_string. If we had a NULL or zero-length string, we would use uninitialised data in the result string. Andrew Bartlett (This used to be commit df10aee451b431a8a056a949a98393da256185da)
* Merge (HEAD->3.0) mbp's fixes to our charcnv code - don't use a staic buffer,Andrew Bartlett2003-04-221-12/+33
| | | | | | | which can restrict things like unix_strupper() to 512 byte strings. Andrew Bartlett (This used to be commit 341d6affa474262654f83c075f186d985cbcb9a0)
* Merge across tridge's Realloc fix.Jeremy Allison2003-04-141-3/+3
| | | | | Jeremy. (This used to be commit df214d18817467fbe3023a412bceec325f73b518)
* Export lazy_initialize_conv so that it can be called fromMartin Pool2003-04-041-1/+5
| | | | | | | check_dos_char. init_iconv: Call init_doschar_table when reinitializing conversions. (This used to be commit d0b2c5d7ba5531fc695a23bba87a1551cc39e2ee)
* lazy_initialize_conv: Remove redundant call to init_valid_table,Martin Pool2003-04-041-4/+6
| | | | | | | | because init_iconv calls it for us. init_iconv: Add documentation about how this is reintialized when configuration is reloaded. (This used to be commit 0ee80a9018601fbba1c9558545de61cb16e94fac)
* Patch from Samuel Thibault to convert messages from dos to unix charsetJelmer Vernooij2003-03-201-1/+1
| | | | | when sending(and vice versa when receiving). (This used to be commit 5310447ec6e0df1c000e3ee14572f5b7fee31f28)
* Merge in the developer string options from HEAD. We need to ensure 3.0Jeremy Allison2003-03-181-103/+12
| | | | | | | is as stable as possible in the string department and some pain now will help later :-). Jeremy. (This used to be commit 86e3eddac698d90f4666b8492b4603a4efbbd67b)
* Merge documentation from HEADMartin Pool2003-02-241-6/+13
| | | | (This used to be commit 3761f8ebe339fbbeffee9d7b69f9483ebfd9ae6b)
* Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.Andrew Bartlett2003-02-241-83/+92
| | | | | Andrew Bartlett (This used to be commit 9ef0d40c3f8aef52ab321dc065264c42065bc876)
* Add comment about Samba character sets, from explanation by abartlet.Martin Pool2003-02-241-0/+13
| | | | (This used to be commit 822f6c2f38b9b30dca2358e99ad6a379f5890c89)
* Merge from HEAD - pull_ucs2_talloc() should pull to a char**, not a void**Jeremy Allison2003-02-121-2/+2
| | | | | Jeremy. (This used to be commit 81437e2ad034e9b83ae954c17a7a261504c55101)
* Merge of signed/unsigned fixes from HEAD.Andrew Bartlett2003-02-011-2/+2
| | | | (This used to be commit e9f56a157bd472914eebf64fde586104d8274717)
* Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett2003-01-031-6/+6
| | | | | | | warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
* Fix all returns to be size_t (they are all unsigned). Fixup strlen beingJeremy Allison2002-11-111-213/+244
| | | | | | done on ucs2 strings. Jeremy. (This used to be commit 9a6c6946193289eac5b91fe6fd236c0742ec6f8c)
* syncing up with HEAD. Seems to be a lot of differences creeping inGerald Carter2002-10-011-2/+2
| | | | | | (i ignored the new SAMBA stuff, but the rest of this looks like it should have been merged already). (This used to be commit 3de09e5cf1f667e410ee8b9516a956860ce7290f)
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-4/+6
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* sync 3.0 branch with headJelmer Vernooij2002-08-171-9/+10
| | | | (This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-6/+30
| | | | (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
* add {push,pull}_ucs2{allocate,talloc}() functions.Andrew Bartlett2002-03-251-0/+58
| | | | | Andrew Bartlett (This used to be commit ce7990b4a4f251536dd26be5a62c12711df57787)
* Patch from Hasch@t-online.de (Juergen Hasch) to add allocate and tallocAndrew Bartlett2002-03-231-1/+86
| | | | | | | push/pull utf8 functions. To be used for international ADS support. Andrew Bartlett (This used to be commit 9ab144810efeb0b086257143b01ca47ee5718861)
* Fix up the pull_utf8_fstring/pstring functions, and add their push eqivilants.Andrew Bartlett2002-03-011-4/+14
| | | | | | | patch by Hasch@t-online.de (Juergen Hasch) Andrew Bartlett (This used to be commit ba2570f518e07c95b952fb824a2d0b040b912bcc)
* This should kill off the 'cannot convert' error messages on non-iconv hosts.Andrew Bartlett2002-03-011-1/+1
| | | | (This used to be commit 2a30960276ae65b60d01caf9464808d75a812e40)
* Patch from Hasch@t-online.de (Juergen Hasch) to add UTF-8 as an explictAndrew Bartlett2002-02-191-1/+67
| | | | | | | | character set for conversion. To be used in Winbind and the 'net ads' commands. Andrew Bartlett (This used to be commit fa9d3060ff7510e176d7608b49075379500f55c4)
* better debug messages!Simo Sorce2002-02-041-0/+1
| | | | (This used to be commit e3bb6867454307ae592115e205d32ddd53988678)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* We have to do some initialization before the string conversionMartin Pool2002-01-221-13/+15
| | | | | | | routines can work. The code was copied into both convert_string and convert_string_allocate -- I split it into a little static function, and removed an apparently duplicate call to init_valid_table(). (This used to be commit 7f7d22880d40c7344bc402203dd150255fc694cf)
* more irix -64 portability fixesAndrew Tridgell2001-12-311-1/+0
| | | | (This used to be commit 65e857b36e170e3ecd78bf6695ae73342e9c04cd)
* much better auto-init of valid_table[]. This should just about removeAndrew Tridgell2001-12-201-1/+12
| | | | | the need for valid.dat (This used to be commit 0cfd0a5e543181b1384f7afee93fbaf3ccb2b999)
* fixed some krb5 ifdefsAndrew Tridgell2001-11-281-2/+2
| | | | (This used to be commit 23ef22f11700bbaa5778a9678a990a2b041fcefe)
* More better now.Martin Pool2001-11-231-4/+4
| | | | (This used to be commit a875b3a6e7a9501a31fe15fb9b04394a95484e77)
* Quieten gcc const warning.Martin Pool2001-11-231-17/+21
| | | | | doxyfy. (This used to be commit 6ddd8e7bf69d8aee4148cbcf72de55c903d5f0a1)
* messed up with patches, this should be the right one,Simo Sorce2001-11-121-2/+1
| | | | | sorry (This used to be commit 023514a0b6170b1907696a2147ee44dc3aa4589d)
* some bugfix and new functions,Simo Sorce2001-11-121-5/+43
| | | | | | modified mangle.c to use mosltly acnv_????() functions. this should make also build farm happy (This used to be commit 8bb5cb27c2012b8967482255d48a1b48d3acd9db)
* fixed, moved and added some functionsSimo Sorce2001-11-101-5/+41
| | | | | note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c (This used to be commit 64dde3b64fc091cda95fc4ed145595b5d79b2e01)
* add convert_string_allocate() functionSimo Sorce2001-11-071-5/+86
| | | | (This used to be commit 8b494b0be323c983b7ea3d1dcf1f61216396caec)
* a big one:Simo Sorce2001-11-041-1/+7
| | | | | | | | | | | | | | | | | | - old mangle code has gone, the new one based on tdb seem resonably ok probably the valid.dat table need to be updated to treat wild chars as invalid ones (work ok without it) - a LOT of new string manipulation function for unicode, they are somewhat tested but a review would not be bad - some new function I will need for the new unix_convert function I'm writing, this will be renamed filename_convert and use only unicode strings. - charconv, I attached a comment, if someone wnat to look if I'm right or just was hacking to late in the night to make a sane one :) of course any bug is my responsibility an will be pleased to see patches if you find any. :-) Simo. (This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)
* More spelling and grammer from Vance. <vance@digital-host.net>Andrew Bartlett2001-10-291-6/+6
| | | | | | | Thanks! Andrew Bartlett (This used to be commit f019bed7663b4a20c1b5ab6b59fcadda17b89acd)
* get rid of compiler warnings (casts and delete unused variables)Herb Lewis2001-10-231-7/+5
| | | | (This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808)
* switched over to a new method of handling uppercase/lowercase mappingsAndrew Tridgell2001-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | for unicode strings. The new method relies on 3 files that are mmap'd at startup to provide the mapping tables. The upcase.dat and lowcase.dat tables should be the same on all systems. The valid.dat table says what characters are valid in 8.3 names, and differs between systems. I'm committing the japanese valid.dat here, in future we need some way of automatically installing and choosing a appropriate table. This commit also adds my mini tdb based gettext replacement in intl/lang_tdb.c. I have not enabled this yet and have not removed the old gettext code as the new code is still being looked at by Monyo. Right now the code assumes that the upcase.dat, lowcase.dat and valid.dat files are installed in the Samba lib directory. That is not a good choice, but I'll leave them there until we work out the new install directory structure for Samba 3.0. simo - please look at the isvalid_w() function and think about using it in your new mangling code. That should be the final step to correctly passing the chargen test code from monyo. (This used to be commit 1c221994f118dd542a158b2db51e07d04d0e9314)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* make strupper() and strlower() not modify the string if it doesn'tAndrew Tridgell2001-09-301-2/+2
| | | | | | | need modifying that makes constant strings OK (This used to be commit 57196635d9b7edfcbfe1708dd22308ab30c02240)