Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that the 'table' modules are gone, there is no reason for there to
be charset modules at all. This builds the macosxfs and weird modules
into the binary at the appropriate times, and changes the tests to
test instead the difference between the remaining internal handlers
and iconv().
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104
|
|
These modules are now known to be faulty, and Samba 3.6.0 didn't
include support for them, so we now require a system iconv if you wish
to support these character sets for the non-ASCII range.
Andrew Bartlett
|
|
We need to know that we can load the samba-provided modules, and that
they are correct. However, we must mark a number of tests as
knownfail due to errors in our internal iconv modules.
Andrew Bartlett
|
|
systems.
Re-add:
smb_ucs2_t toupper_w(smb_ucs2_t v);
and ensure it is called whenever we are operating on smb_ucs2_t
variables. I'd like to make the definition of smb_ucs2_t incompatible
with int and codepoint_t so they can't be mixed, but that's a patch
for another time.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jul 19 23:48:05 CEST 2011 on sn-devel-104
|
|
Remove
int toupper_ascii(int c);
int tolower_ascii(int c);
int isupper_ascii(int c);
int islower_ascii(int c);
and replace with their _m equivalents, as they are identical.
|
|
As discussed in 'CH_DISPLAY and gettext' on the samba-technical list:
http://lists.samba.org/archive/samba-technical/2011-June/078190.html
Setting this to a value other than 'unix charset' does not make sense,
as any system where the filesytem charset does not equal the terminal
charset will already have problems with programs as simple as 'ls'.
It also means that our output could not be pasted as our input in
interactive programs or onto our command line, as we never did
translate in the DISPLAY -> UNIX direction.
The d_printf() calls are retained in case we need to revisit this, and
to support display_set_stderr().
Andrew Bartlett
|
|
This removes the 'charset' subsystem and allows these modules to be
used across the whole of Samba.
Andrew Bartlett
|
|
This function is problematic because a string may expand in size when
changed into upper or lower case. This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.
Andrew Bartlett
|
|
|
|
This adds an interface that matches the source3/ convert string code.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
It makes much more sense for this to match the source3/ interface and
return a bool.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
This file (largely) contains functions to deal with UTF16 strings.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
This adds tests for:
strncasecmp_m
strcasecmp_m
strupper_talloc_n
strlower_talloc
strhaslower
strhasupper
The tests can certainly be improved with pre-calculated upper and
lower case text, but this at least puts them though their paces.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104
|
|
This allows test routines to force in particular character sets, and
not rely on the smb.conf.
Andrew Bartlett
|
|
Makes these interfaces much harder to misuse and easier to ensure error
checking.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
|
|
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 30 13:02:47 CEST 2011 on sn-devel-104
|
|
This better reflects what this structure is
Andrew Bartlett
|
|
we need to move towards eliminating smb_ucs2_t. This moves a couple of
the related macros into the only file they are used in
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
|
|
These functions now use the codepoints for more accurate string
handling and now form common code.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 23 08:21:54 CET 2011 on sn-devel-104
|
|
When called from a library, we don't want to call this, as we may
overwrite some of our calling program's context.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 18 09:29:35 CET 2011 on sn-devel-104
|
|
We now use the struct smb_iconv_convenience at the core of all our
iconv code, and use global_iconv_convenience for the callers that
don't specify one.
Andrew Bartlett
|
|
The two files were very similar already, the only change required was
to adopt the s3 module registration fucntion name.
(NTSTATUS wasn't used as the charset code does not otherwise use that
type).
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
|
|
strlen_m_ext() counting terminator
|
|
charset
The function calculates the number of units (8 or 16-bit, depending
on the destination charset), that would be needed to convert the
input string which is expected to be in in src_charset encoding
to the dst_charset (which should be a unicode charset).
|
|
next_codepoint() takes as string in CH_UNIX encoding and returns the
unicode codepoint of the next (possibly multibyte) character of the
input string.
The new next_codepoint_ext() function adds the encoding of the input
string as a parameter. next_codepoint() now only calls next_codepoint_ext()
with CH_UNIX als src_charset argument.
|
|
charset.
next_codepoint_convenience() takes as string in CH_UNIX encoding and returns the
unicode codepoint of the next (possibly multibyte) character of the
input string.
The new next_codepoint_convenience_ext() function adds the encoding of the input
string as a parameter. next_codepoint_convenience() now only calls
next_codepoint_convenience_ext() with CH_UNIX als src_charset argument.
|
|
This seems to have been copied twice from source3/ code.
|
|
In the push routine we do the SVAL, so we should do the SSVAL here.
|
|
|
|
We had a crash bug where a cached copy of a iconv convenience pointer
was used after being freed when loadparm asked for iconv to
reload. This could happen if a python module used a iconv based
function before loadparm was completed.
The fix is to ensure that any use of this pointer remains valid, by
reusing the pointer itself when it has already been initialised, but
filling in the child elements with the updated values.
|
|
|
|
|
|
|
|
|
|
|
|
consistency with Samba 3.
|
|
Guenther
|
|
|
|
Changed the approach for the charset to go via utf16, which makes a
bit more sense to read.
Added a testsuiite for UTF16_MUNGED as part of LOCAL-ICONV
|
|
|
|
|
|
|
|
make them wrappers around convert_string{,talloc}_convenience().
|
|
functions.
|
|
|
|
|
|
|