summaryrefslogtreecommitdiff
path: root/source4/lib/iconv.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r3322: fixed a bunch of warnings in the build, including one case where it ↵Andrew Tridgell1-5/+5
was a real bug (This used to be commit 02d5d0f685e44bd66aff4a007f0bf34c8f915574)
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell1-1/+1
of associated functions. The motivation for this change was to avoid having to convert to/from ucs2 strings for so many operations. Doing that was slow, used many static buffers, and was also incorrect as it didn't cope properly with unicode codepoints above 65536 (which could not be represented correctly as smb_ucs2_t chars) The two core functions that allowed this change are next_codepoint() and push_codepoint(). These functions allow you to correctly walk a arbitrary multi-byte string a character at a time without converting the whole string to ucs2. While doing this cleanup I also fixed several ucs2 string handling bugs. See the commit for details. The following code (which counts the number of occuraces of 'c' in a string) shows how to use the new interface: size_t count_chars(const char *s, char c) { size_t count = 0; while (*s) { size_t size; codepoint_t c2 = next_codepoint(s, &size); if (c2 == c) count++; s += size; } return count; } (This used to be commit 814881f0e50019196b3aa9fbe4aeadbb98172040)
2007-10-10r2678: from_name and to_name aren't needed in smb_iconv_tAndrew Tridgell1-3/+0
(This used to be commit f3844cc0a5ad6b03f166435d44db02763df345d7)
2007-10-10r2169: switch core iconv code to use tallocAndrew Tridgell1-10/+9
(This used to be commit 117796c19ba9615113ae549068fd0b5ad5d3aa97)
2007-10-10r2164: put the latest "accept either form" utf-16 iconv code in samba4Andrew Tridgell1-6/+16
(This used to be commit 62a0cfd865d6ad4c05e2461dbf0b81988683a219)
2007-10-10r2159: converted samba4 over to UTF-16.Andrew Tridgell1-65/+197
I had previously thought this was unnecessary, as windows doesn't use standards compliant UTF-16, and for filesystem operations treats bytes as UCS-2, but Bjoern Jacke has pointed out to me that this means we don't correctly store extended UTF-16 characters as UTF-8 on disk. This can be seen with (for example) the gothic characters with codepoints above 64k. This commit also adds a LOCAL-ICONV torture test that tests the first 1 million codepoints against the system iconv library, and tests 5 million random UTF-16LE buffers for identical error handling to the system iconv library. the lib/iconv.c changes need backporting to samba3 (This used to be commit 756f28ac95feaa84b42402723d5f7286865c78db)
2007-10-10r2106: try to cope with a wider range of UTF-16 characters when we are usingAndrew Tridgell1-0/+5
an external libiconv library. (This used to be commit 168be7fbd7ae876ded39f73a7835e91b35e67244)
2007-10-10r2060: fix compiler warningStefan Metzmacher1-3/+3
metze (This used to be commit dde5442b75ba169856a52a45588e2702d198b31d)
2007-10-10r1130: remove some pointless debug messagesAndrew Tridgell1-2/+0
(This used to be commit 260be3fbef5a198621274cfe0c0250f292d819ca)
2007-10-10r962: convert 'unsigned' and 'unsigned int' to uint_tStefan Metzmacher1-1/+1
metze (This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
2007-10-10r943: change samba4 to use 'uint8_t' instead of 'unsigned char'Stefan Metzmacher1-4/+4
metze (This used to be commit b5378803fdcb3b3afe7c2932a38828e83470f61a)
2003-12-16added support for big-endian ucs2 strings (as used by big-endianAndrew Tridgell1-5/+32
msrpc). this was easier than I expected! (This used to be commit a0a51af6b746b1f82faaa49d33c17fea9d708fb0)
2003-11-25CVS: ----------------------------------------------------------------------Jelmer Vernooij1-4/+7
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: Makefile.in configure.in include/includes.h include/ntvfs.h CVS: include/smb.h lib/iconv.c lib/module.c ntvfs/ntvfs_base.c CVS: ntvfs/cifs/vfs_cifs.c ntvfs/ipc/vfs_ipc.c CVS: ntvfs/posix/vfs_posix.c ntvfs/print/vfs_print.c CVS: ntvfs/reference/vfs_ref.c ntvfs/simple/vfs_simple.c CVS: passdb/pdb_interface.c CVS: Added Files: CVS: include/module.h CVS: ---------------------------------------------------------------------- Update to the modules system. Fixed: - get rid of smb_probe_module - merge older updates from 3.0 - introduced register_subsystem() and register_backend() functions - adapt ntvfs and charset to use new register functions - made smb_load_modules() work recursively (e.g. 'preload modules = /usr/lib/samba') - got rid of some old remains Things that still need work: - Did I break tankFS? I don't think so, but I can't test it here :-( - Add 'postload modules = ' (for modules that need to be loaded after fork() in smbd, if applicable) - Convert RPC, auth, passdb, etc to use new register_{subsystem,backend}() functions - Accept wildcards in 'preload modules' option, instead of loading recursively (This used to be commit 7512b9ab1a8b3103f7a6c13f736353c46a26b668)
2003-08-13first public release of samba4 codeAndrew Tridgell1-0/+526
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)