summaryrefslogtreecommitdiff
path: root/source4/torture/local/iconv.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r8520: fixed a pile of warnings from the build farm gcc -Wall output onAndrew Tridgell1-6/+6
S390. This is an attempt to avoid the panic we're seeing in the automatic builds. The main fixes are: - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats - use of NULL format statements to perform dn searches. - assumption that sizeof() returns an int (This used to be commit a58ea6b3854973b694d2b1e22323ed7eb00e3a3f)
2007-10-10r7901: check if system supports UTF-16LE at all in LOCAL-ICONV testAndrew Tridgell1-1/+9
(This used to be commit aa9e7cf63a0e5ce7c9b7d121a4df064cd6fae90f)
2007-10-10r7898: don't die on bad iconv libs in LOCAL-ICONV testAndrew Tridgell1-0/+8
(This used to be commit fe7055df94ecc81d6758ee7ff82534451d620d6a)
2007-10-10r7426: add an option to disable progress outputStefan Metzmacher1-2/+6
torture:progress=no metze (This used to be commit 820e5a1270d8bd308f03fc96161396fb4b95da61)
2007-10-10r3749: don't consider it a failure if we fail to re-encode a codepoint aboveAndrew Tridgell1-19/+25
1M, or in the case of non-UTF charsets, above 256 (This used to be commit 02595c14ac44403dd193d084dea9b91a67554a94)
2007-10-10r3447: more include/system/XXX.h include filesAndrew Tridgell1-0/+1
(This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105)
2007-10-10r3446: created include/system/iconv.h and include/system/shmem.hAndrew Tridgell1-0/+1
(This used to be commit 70055fb1f499cd40e996e56c7ba9ef8d2267b421)
2007-10-10r3324: made the smbtorture code completely warning freeAndrew Tridgell1-3/+3
(This used to be commit 7067bb9b52223cafa28470f264f0b60646a07a01)
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell1-5/+49
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-10r2170: if we don't have a native iconv library then we can't build this testAndrew Tridgell1-1/+10
(This used to be commit 5cf9333f6021479d62cc99475f4fb9a19588f928)
2007-10-10r2165: generalise the charset torture test to add testing of CP850Andrew Tridgell1-30/+39
potentially we can test any charset (This used to be commit e754d0cbcab7cb5a65322e5bbbd1d2a8bcdf5375)
2007-10-10r2159: converted samba4 over to UTF-16.Andrew Tridgell1-0/+298
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)